Uniformize platform setup (#47101)
* A platform is not a component * Fix dynalite * SUPPORTED_PLATFORMS --> PLATFORMS * In tests * In tests 2 * Fix SmartThings * Fix ZHA test * Fix Z-Wave * Revert Z-Wave * Use PLATFORMS const in ambient_station * Fix ihc comment
This commit is contained in:
parent
ca54de095d
commit
198ecb0945
218 changed files with 924 additions and 932 deletions
|
@ -45,9 +45,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
|
||||
hass.data[DOMAIN][entry.entry_id] = dtv
|
||||
|
||||
for component in PLATFORMS:
|
||||
for platform in PLATFORMS:
|
||||
hass.async_create_task(
|
||||
hass.config_entries.async_forward_entry_setup(entry, component)
|
||||
hass.config_entries.async_forward_entry_setup(entry, platform)
|
||||
)
|
||||
|
||||
return True
|
||||
|
@ -58,8 +58,8 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
unload_ok = all(
|
||||
await asyncio.gather(
|
||||
*[
|
||||
hass.config_entries.async_forward_entry_unload(entry, component)
|
||||
for component in PLATFORMS
|
||||
hass.config_entries.async_forward_entry_unload(entry, platform)
|
||||
for platform in PLATFORMS
|
||||
]
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue