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:
committed by
GitHub
parent
83e8c3fc19
commit
a573ef4b1c
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user