Fix ingress on panel after restore (#1508)

* Fix ingress on panel after restore

* Supress errors
This commit is contained in:
Pascal Vizeli 2020-02-14 15:58:26 +01:00 committed by GitHub
parent 9e5c276e3b
commit e24987a610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,11 +272,14 @@ class AddonManager(CoreSysAttributes):
await addon.restore(tar_file)
# Check if new
if slug in self.local:
return
if slug not in self.local:
_LOGGER.info("Detect new Add-on after restore %s", slug)
self.local[slug] = addon
_LOGGER.info("Detect new Add-on after restore %s", slug)
self.local[slug] = addon
# Update ingress
if addon.with_ingress:
with suppress(HomeAssistantAPIError):
await self.sys_ingress.update_hass_panel(addon)
async def repair(self) -> None:
"""Repair local add-ons."""