Update __init__.py
This commit is contained in:
parent
2ce5d6ad9f
commit
93afc2b255
|
|
@ -150,11 +150,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ReveilConfigEntry) -> bo
|
|||
await manager.async_load()
|
||||
entry.runtime_data = manager
|
||||
|
||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||
|
||||
manager.async_start()
|
||||
entry.async_on_unload(manager.async_stop)
|
||||
entry.async_on_unload(entry.add_update_listener(_async_reload_on_update))
|
||||
|
||||
hass.data.setdefault(DOMAIN, {})
|
||||
|
||||
if len(hass.data[DOMAIN]) == 1:
|
||||
www_path = Path(__file__).parent / "www"
|
||||
|
|
@ -164,6 +163,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ReveilConfigEntry) -> bo
|
|||
StaticPathConfig(f"/api/{DOMAIN}/reveil-card.js", str(card_file), cache_headers=False)
|
||||
])
|
||||
|
||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||
entry.async_on_unload(entry.add_update_listener(_async_reload_on_update))
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue