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

@@ -22,10 +22,7 @@ from homeassistant.components.unifi.const import (
DOMAIN as UNIFI_DOMAIN,
UNIFI_WIRELESS_CLIENTS,
)
from homeassistant.components.unifi.controller import (
SUPPORTED_PLATFORMS,
get_controller,
)
from homeassistant.components.unifi.controller import PLATFORMS, get_controller
from homeassistant.components.unifi.errors import AuthenticationRequired, CannotConnect
from homeassistant.const import (
CONF_HOST,
@@ -211,7 +208,7 @@ async def test_controller_setup(hass, aioclient_mock):
controller = hass.data[UNIFI_DOMAIN][config_entry.entry_id]
entry = controller.config_entry
assert len(forward_entry_setup.mock_calls) == len(SUPPORTED_PLATFORMS)
assert len(forward_entry_setup.mock_calls) == len(PLATFORMS)
assert forward_entry_setup.mock_calls[0][1] == (entry, TRACKER_DOMAIN)
assert forward_entry_setup.mock_calls[1][1] == (entry, SENSOR_DOMAIN)
assert forward_entry_setup.mock_calls[2][1] == (entry, SWITCH_DOMAIN)