mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-28 11:36:32 +00:00
Fix merge conflict with versions
This commit is contained in:
commit
47491ca55b
@ -1,7 +1,7 @@
|
|||||||
"""Const file for HassIO."""
|
"""Const file for HassIO."""
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
HASSIO_VERSION = '0.51'
|
HASSIO_VERSION = '0.52'
|
||||||
|
|
||||||
URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/'
|
URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/'
|
||||||
'hassio/{}/version.json')
|
'hassio/{}/version.json')
|
||||||
|
@ -138,15 +138,15 @@ class HassIO(object):
|
|||||||
await self.api.start()
|
await self.api.start()
|
||||||
_LOGGER.info("Start hassio api on %s", self.config.api_endpoint)
|
_LOGGER.info("Start hassio api on %s", self.config.api_endpoint)
|
||||||
|
|
||||||
# start addon mark as system
|
|
||||||
await self.addons.auto_boot(STARTUP_SYSTEM)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# HomeAssistant is already running / supervisor have only reboot
|
# HomeAssistant is already running / supervisor have only reboot
|
||||||
if await self.homeassistant.is_running():
|
if await self.homeassistant.is_running():
|
||||||
_LOGGER.info("HassIO reboot detected")
|
_LOGGER.info("HassIO reboot detected")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# start addon mark as system
|
||||||
|
await self.addons.auto_boot(STARTUP_SYSTEM)
|
||||||
|
|
||||||
# start addon mark as services
|
# start addon mark as services
|
||||||
await self.addons.auto_boot(STARTUP_SERVICES)
|
await self.addons.auto_boot(STARTUP_SERVICES)
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@ from ..const import (
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
AUDIO_DEVICE = "/dev/snd:/dev/snd:rwm"
|
||||||
|
|
||||||
|
|
||||||
class DockerAddon(DockerBase):
|
class DockerAddon(DockerBase):
|
||||||
"""Docker hassio wrapper for HomeAssistant."""
|
"""Docker hassio wrapper for HomeAssistant."""
|
||||||
@ -28,6 +30,11 @@ class DockerAddon(DockerBase):
|
|||||||
"""Return name of docker container."""
|
"""Return name of docker container."""
|
||||||
return "addon_{}".format(self.addon.slug)
|
return "addon_{}".format(self.addon.slug)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hostname(self):
|
||||||
|
"""Return slug/id of addon."""
|
||||||
|
return self.addon.slug.replace('_', '-')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def environment(self):
|
def environment(self):
|
||||||
"""Return environment for docker add-on."""
|
"""Return environment for docker add-on."""
|
||||||
@ -43,6 +50,20 @@ class DockerAddon(DockerBase):
|
|||||||
'TZ': self.config.timezone,
|
'TZ': self.config.timezone,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def devices(self):
|
||||||
|
"""Return needed devices."""
|
||||||
|
devices = self.addon.devices or []
|
||||||
|
|
||||||
|
# use audio devices
|
||||||
|
if self.addon.with_audio and AUDIO_DEVICE not in devices:
|
||||||
|
devices.append(AUDIO_DEVICE)
|
||||||
|
|
||||||
|
# Return None if no devices is present
|
||||||
|
if devices:
|
||||||
|
return devices
|
||||||
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def tmpfs(self):
|
def tmpfs(self):
|
||||||
"""Return tmpfs for docker add-on."""
|
"""Return tmpfs for docker add-on."""
|
||||||
@ -122,12 +143,12 @@ class DockerAddon(DockerBase):
|
|||||||
self.dock.containers.run(
|
self.dock.containers.run(
|
||||||
self.image,
|
self.image,
|
||||||
name=self.name,
|
name=self.name,
|
||||||
hostname=self.addon.slug,
|
hostname=self.hostname,
|
||||||
detach=True,
|
detach=True,
|
||||||
network_mode=self.addon.network_mode,
|
network_mode=self.addon.network_mode,
|
||||||
ports=self.addon.ports,
|
ports=self.addon.ports,
|
||||||
extra_hosts=self.mapping,
|
extra_hosts=self.mapping,
|
||||||
devices=self.addon.devices,
|
devices=self.devices,
|
||||||
cap_add=self.addon.privileged,
|
cap_add=self.addon.privileged,
|
||||||
environment=self.environment,
|
environment=self.environment,
|
||||||
volumes=self.volumes,
|
volumes=self.volumes,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"hassio": "0.51",
|
"hassio": "0.52",
|
||||||
"homeassistant": "0.50.2",
|
"homeassistant": "0.50.2",
|
||||||
"resinos": "1.0",
|
"resinos": "1.0",
|
||||||
"resinhup": "0.3",
|
"resinhup": "0.3",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user