added enable/disable interface switches

This commit is contained in:
tomaae 2019-12-03 01:49:25 +01:00
parent a3e6e5692b
commit 634db3f44e
2 changed files with 191 additions and 0 deletions

View file

@ -60,6 +60,10 @@ async def async_setup_entry(hass, config_entry):
hass.config_entries.async_forward_entry_setup(config_entry, "device_tracker")
)
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, "switch")
)
device_registry = await hass.helpers.device_registry.async_get_registry()
device_registry.async_get_or_create(
config_entry_id=config_entry.entry_id,