Skip to content

refactor: extract API client, add typed models, and optimise polling - #3

Open
sguernion wants to merge 1 commit into
openfirenet:mainfrom
homeassistant-fr-ecosystem:feat/api_wrapper
Open

refactor: extract API client, add typed models, and optimise polling#3
sguernion wants to merge 1 commit into
openfirenet:mainfrom
homeassistant-fr-ecosystem:feat/api_wrapper

Conversation

@sguernion

Copy link
Copy Markdown
  • Introduces a dedicated OpenFirenetClient class in a new api.py file, centralising all HTTP logic (session reuse, GET/POST, connection validation).

  • Adds FirenetControls and FirenetData dataclasses to replace raw dict access across the integration, making control field access type-safe and eliminating defensive .get() guards.

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.

1 participant