Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

refactor: split into multiple coordinators to reduce API usage#1102

Open
WebSpider wants to merge 4 commits into
skodaconnect:mainfrom
WebSpider:multi-coordinator-data-fetching
Open

refactor: split into multiple coordinators to reduce API usage#1102
WebSpider wants to merge 4 commits into
skodaconnect:mainfrom
WebSpider:multi-coordinator-data-fetching

Conversation

@WebSpider

@WebSpider WebSpider commented May 20, 2026

Copy link
Copy Markdown
Contributor

Fixes #1056

Previously a single coordinator fetched all endpoints on every poll. Fast-changing data (charging, status, AC, positions) is now handled by the primary coordinator at the user-configured interval; slow-changing data (trip statistics, maintenance, health, vehicle info) is handled by a new MySkodaSlowCoordinator on a fixed interval.

_on_mqtt_event no longer calls async_set_updated_data unconditionally: entity updates on MQTT now only fire for OperationEvents. This prevents unneeded load on the HomeAssistant State Engine

All entities declare their coordinator domain via coordinator_domain (default "primary"); slow-domain sensors override this to "slow".

TODO: Rigorous testing needed

Fixes skodaconnect#1056

Previously a single coordinator fetched all endpoints on every poll.
Fast-changing data (charging, status, AC, positions) is now handled
by the primary coordinator at the user-configured interval; slow-changing
data (trip statistics, maintenance, health, vehicle info) is handled by a
new `MySkodaSlowCoordinator` on a fixed interval.

`_on_mqtt_event` no longer calls `async_set_updated_data` unconditionally:
entity updates on MQTT now only fire for `OperationEvents`. This prevents
unneeded load on the HomeAssistant State Engine

All entities declare their coordinator domain via coordinator_domain
(default "primary"); slow-domain sensors override this to "slow".
@WebSpider WebSpider added the maintenance Code maintenance label May 20, 2026
@dvx76 dvx76 self-requested a review June 7, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Code maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Todo: Reimplement fetching data

1 participant