Skip to content

Conversation

@RustyDust
Copy link
Contributor

Added async SonnenAPI client variants based on aiohttp:

  • AsyncSonnenBatterie - SonnenAPI v1, async
  • AsyncSonnenBatterieV2 - SonnenAPI v2, async

Important

The async versions require the session to be closed explicitly. So don't forget
to do a sb.logout() when no longer accessing the API / before ending your app.

All internal function calls stay the same for now.

Test cases have been expanded / added to test the new APIs

- `AsyncSonnenBatterie` - SonnenAPI v1, async
- `AsyncSonnenBatterieV2` - SonnenAPI v2, async

> [!IMPORTANT]
> The async versions require the session to be closed explicitly. So don't forget
> to do a `sb.logout()` when no longer accessing the API / before ending your app.

All internal function calls stay the same for now.

Test cases have been expanded / added to test the new APIs

Signed-off-by: Stefan Rubner <stefan@whocares.de>
Moved `const.py` to the respective directories so it will be included in the
pypi package again.

Signed-off-by: Stefan Rubner <stefan@whocares.de>
Signed-off-by: stefan <stefan@whocares.de>
@weltmeyer weltmeyer merged commit 091bbec into weltmeyer:master Dec 30, 2024
1 check passed
@RustyDust RustyDust deleted the create_async_api branch December 30, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants