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:
Quentame 2021-03-02 21:43:59 +01:00 committed by GitHub
parent ca54de095d
commit 198ecb0945
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
218 changed files with 924 additions and 932 deletions

View file

@ -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
]
)
)