From 5ac4a953865f43fff97ac0eb263e7a9eed9d3c7b Mon Sep 17 00:00:00 2001 From: thisistheplace <57633545+thisistheplace@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:10:39 +0000 Subject: [PATCH 1/3] Added channels filter to aggr_data api (#31) --- fronius_solarweb/api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fronius_solarweb/api.py b/fronius_solarweb/api.py index 95a462a..f981e9b 100644 --- a/fronius_solarweb/api.py +++ b/fronius_solarweb/api.py @@ -8,6 +8,7 @@ wait_random_exponential, stop_after_attempt, ) +from typing import List from .errors import NotAuthorizedException, NotFoundException @@ -188,11 +189,14 @@ async def get_system_flow_data(self, tz: str = "zulu") -> PvSystemFlowData: return model_data async def get_system_aggr_data_v2( - self, period: str = "total" + self, period: str = "total", channels: List[str] | None = None ) -> PvSystemAggrDataV2: _LOGGER.debug("Listing PV system aggregated v2 data") + _url = f"{SW_BASE_URL}/pvsystems/{self.pv_system_id}/aggrdata?period={period}" + if channels is not None: + _url += f"&channel={','.join(channels)}" r = await self.httpx_client.get( - f"{SW_BASE_URL}/pvsystems/{self.pv_system_id}/aggrdata?period={period}", + _url, headers=self._common_headers, ) json_data = await self._check_api_response(r) From 0e2b465dfbf256b47b4c68f939ff5ae63fe8dc20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:10:56 +1300 Subject: [PATCH 2/3] Update tenacity requirement from ^8.1 to >=8.1,<10.0 (#30) Updates the requirements on [tenacity](https://github.com/jd/tenacity) to permit the latest version. - [Release notes](https://github.com/jd/tenacity/releases) - [Commits](https://github.com/jd/tenacity/compare/8.1.0...9.0.0) --- updated-dependencies: - dependency-name: tenacity dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ccac667..9d74551 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ issues = "https://github.com/drc38/python-fronius-web/issues" python = ">=3.10" httpx = ">=0.23" pydantic = ">=2,<3.0" -tenacity = "^8.1" +tenacity = ">=8.1,<10.0" [tool.poetry.dev-dependencies] From 15eb9e48dcc3e60758a55715aff6861fca0d2cef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:11:17 +1300 Subject: [PATCH 3/3] Bump JRubics/poetry-publish from 1.17 to 2.0 (#29) Bumps [JRubics/poetry-publish](https://github.com/jrubics/poetry-publish) from 1.17 to 2.0. - [Release notes](https://github.com/jrubics/poetry-publish/releases) - [Commits](https://github.com/jrubics/poetry-publish/compare/v1.17...v2.0) --- updated-dependencies: - dependency-name: JRubics/poetry-publish dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b4b6fde..342bc23 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,6 +19,6 @@ jobs: poetry version ${{ github.ref_name }} - name: Build and publish to pypi - uses: JRubics/poetry-publish@v1.17 + uses: JRubics/poetry-publish@v2.0 with: pypi_token: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file