1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-17 15:44:52 +01:00

Use subentry helper in WAQI (#167061)

This commit is contained in:
Joost Lekkerkerker
2026-04-01 20:20:33 +02:00
committed by GitHub
parent 83e8c3fc19
commit a573ef4b1c

View File

@@ -40,10 +40,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: WAQIConfigEntry) -> bool
entry.runtime_data = {}
for subentry in entry.subentries.values():
if subentry.subentry_type != SUBENTRY_TYPE_STATION:
continue
for subentry in entry.get_subentries_of_type(SUBENTRY_TYPE_STATION):
# Create a coordinator for each station subentry
coordinator = WAQIDataUpdateCoordinator(hass, entry, subentry, client)
await coordinator.async_config_entry_first_refresh()