Better initial image load handling
@@ -251,14 +251,24 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
"""Install a landing page."""
_LOGGER.info("Setup HomeAssistant landingpage")
while True:
+ if not self.sys_updater.image_homeassistant:
+ _LOGGER.warning(
+ "Found no information about Home Assistant. Retry in 15sec"
+ )
+ await asyncio.sleep(15)
+ await self.sys_updater.reload()
+ continue
+
try:
- await self.instance.install("landingpage", image=self.image)
+ await self.instance.install(
+ "landingpage", image=self.sys_updater.image_homeassistant
+ )
except DockerAPIError:
_LOGGER.warning("Fails install landingpage, retry after 30sec")
await asyncio.sleep(30)
else:
self.version = self.instance.version
- self.image = self.instance.image
+ self.image = self.sys_updater.image_homeassistant
self.save_data()
break
