1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

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
218 changed files with 924 additions and 932 deletions

View File

@@ -54,7 +54,7 @@ async def test_setup_manual(hass: HomeAssistant):
with patch(f"{BASE_PATH}.DysonAccount.login", return_value=True) as login, patch(
f"{BASE_PATH}.DysonAccount.devices", return_value=devices
) as devices_method, patch(
f"{BASE_PATH}.DYSON_PLATFORMS", ["fan", "vacuum"]
f"{BASE_PATH}.PLATFORMS", ["fan", "vacuum"]
): # Patch platforms to get rid of sensors
assert await async_setup_component(hass, DOMAIN, config)
await hass.async_block_till_done()
@@ -85,7 +85,7 @@ async def test_setup_autoconnect(hass: HomeAssistant):
with patch(f"{BASE_PATH}.DysonAccount.login", return_value=True), patch(
f"{BASE_PATH}.DysonAccount.devices", return_value=devices
), patch(
f"{BASE_PATH}.DYSON_PLATFORMS", ["fan"]
f"{BASE_PATH}.PLATFORMS", ["fan"]
): # Patch platforms to get rid of sensors
assert await async_setup_component(hass, DOMAIN, config)
await hass.async_block_till_done()