mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-25 18:16:32 +00:00
commit
4c13dfb43c
@ -16,7 +16,7 @@
|
|||||||
"python.linting.enabled": true,
|
"python.linting.enabled": true,
|
||||||
"python.formatting.provider": "black",
|
"python.formatting.provider": "black",
|
||||||
"python.formatting.blackArgs": [
|
"python.formatting.blackArgs": [
|
||||||
"--target--version",
|
"--target-version",
|
||||||
"py37"
|
"py37"
|
||||||
],
|
],
|
||||||
"editor.formatOnPaste": false,
|
"editor.formatOnPaste": false,
|
||||||
@ -24,4 +24,4 @@
|
|||||||
"editor.formatOnType": true,
|
"editor.formatOnType": true,
|
||||||
"files.trimTrailingWhitespace": true
|
"files.trimTrailingWhitespace": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ from pathlib import Path
|
|||||||
from ipaddress import ip_network
|
from ipaddress import ip_network
|
||||||
|
|
||||||
|
|
||||||
HASSIO_VERSION = "171"
|
HASSIO_VERSION = "172"
|
||||||
|
|
||||||
URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons"
|
URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons"
|
||||||
URL_HASSIO_VERSION = "https://version.home-assistant.io/{channel}.json"
|
URL_HASSIO_VERSION = "https://version.home-assistant.io/{channel}.json"
|
||||||
|
@ -172,6 +172,7 @@ class HassIO(CoreSysAttributes):
|
|||||||
|
|
||||||
async def repair(self):
|
async def repair(self):
|
||||||
"""Repair system integrity."""
|
"""Repair system integrity."""
|
||||||
|
_LOGGER.info("Start repairing of Hass.io Environment")
|
||||||
await self.sys_run_in_executor(self.sys_docker.repair)
|
await self.sys_run_in_executor(self.sys_docker.repair)
|
||||||
|
|
||||||
# Restore core functionality
|
# Restore core functionality
|
||||||
@ -184,3 +185,4 @@ class HassIO(CoreSysAttributes):
|
|||||||
|
|
||||||
# Tag version for latest
|
# Tag version for latest
|
||||||
await self.sys_supervisor.repair()
|
await self.sys_supervisor.repair()
|
||||||
|
_LOGGER.info("Finished repairing of Hass.io Environment")
|
||||||
|
@ -76,20 +76,18 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
|
|||||||
|
|
||||||
async def load(self) -> None:
|
async def load(self) -> None:
|
||||||
"""Prepare Home Assistant object."""
|
"""Prepare Home Assistant object."""
|
||||||
with suppress(DockerAPIError):
|
try:
|
||||||
# Evaluate Version if we lost this information
|
# Evaluate Version if we lost this information
|
||||||
if not self.version:
|
if not self.version:
|
||||||
if await self.instance.is_running():
|
self.version = await self.instance.get_latest_version()
|
||||||
self.version = self.instance.version
|
|
||||||
else:
|
|
||||||
self.version = await self.instance.get_latest_version()
|
|
||||||
self.save_data()
|
|
||||||
|
|
||||||
await self.instance.attach(tag=self.version)
|
await self.instance.attach(tag=self.version)
|
||||||
return
|
except DockerAPIError:
|
||||||
|
_LOGGER.info("No Home Assistant Docker image %s found.", self.image)
|
||||||
_LOGGER.info("No Home Assistant Docker image %s found.", self.image)
|
await self.install_landingpage()
|
||||||
await self.install_landingpage()
|
else:
|
||||||
|
self.version = self.instance.version
|
||||||
|
self.save_data()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def machine(self) -> str:
|
def machine(self) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user