Unload linky config entry (#27831)

pull/49490/head
Quentame 2019-10-18 02:22:16 +02:00 committed by Paulus Schoutsen
parent 3e7fcc7575
commit dcdcfdd376
1 changed files with 8 additions and 2 deletions

View File

@ -47,9 +47,15 @@ async def async_setup(hass, config):
async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
"""Set up Linky sensors."""
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(entry, "sensor")
)
return True
async def async_unload_entry(hass: HomeAssistantType, entry: ConfigEntry):
"""Unload Linky sensors."""
hass.async_create_task(
hass.config_entries.async_forward_entry_unload(entry, "sensor")
)
return True