Clean up superfluous integration setup - part 6 (#49298)

This commit is contained in:
Franck Nijhof 2021-04-16 18:23:27 +02:00 committed by GitHub
parent af80ca6795
commit 7264c95217
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 22 additions and 199 deletions

View file

@ -24,14 +24,6 @@ CONFIG_SCHEMA = cv.deprecated(DOMAIN)
DEFAULT_UPDATE_RATE = 120
async def async_setup(hass: HomeAssistant, config: dict) -> bool:
"""Set up the nexia component from YAML."""
hass.data.setdefault(DOMAIN, {})
return True
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
"""Configure the base Nexia device for Home Assistant."""
@ -75,6 +67,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
update_interval=timedelta(seconds=DEFAULT_UPDATE_RATE),
)
hass.data.setdefault(DOMAIN, {})
hass.data[DOMAIN][entry.entry_id] = {
NEXIA_DEVICE: nexia_home,
UPDATE_COORDINATOR: coordinator,