mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-27 02:56:31 +00:00
Update __init__.py
This commit is contained in:
parent
217c1acc62
commit
a59245e6bb
@ -1,8 +1,8 @@
|
|||||||
"""Host function like audio/dbus/systemd."""
|
"""Host function like audio/dbus/systemd."""
|
||||||
|
|
||||||
from .alsa import AlsaAudio
|
from .alsa import AlsaAudio
|
||||||
from .power import PowerControl
|
from .control import SystemControl
|
||||||
from .local import LocalCenter
|
from .info import InfoCenter
|
||||||
from ..const import FEATURES_REBOOT, FEATURES_SHUTDOWN, FEATURES_HOSTNAME
|
from ..const import FEATURES_REBOOT, FEATURES_SHUTDOWN, FEATURES_HOSTNAME
|
||||||
from ..coresys import CoreSysAttributes
|
from ..coresys import CoreSysAttributes
|
||||||
|
|
||||||
@ -14,8 +14,8 @@ class HostManager(CoreSysAttributes):
|
|||||||
"""Initialize Host manager."""
|
"""Initialize Host manager."""
|
||||||
self.coresys = coresys
|
self.coresys = coresys
|
||||||
self._alsa = AlsaAudio(coresys)
|
self._alsa = AlsaAudio(coresys)
|
||||||
self._power = PowerControl(coresys)
|
self._control = SystemControl(coresys)
|
||||||
self._local = LocalCenter(coresys)
|
self._info = InfoCenter(coresys)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def alsa(self):
|
def alsa(self):
|
||||||
@ -23,14 +23,14 @@ class HostManager(CoreSysAttributes):
|
|||||||
return self._alsa
|
return self._alsa
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def power(self):
|
def control(self):
|
||||||
"""Return host power handler."""
|
"""Return host power handler."""
|
||||||
return self._power
|
return self._control
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def local(self):
|
def info(self):
|
||||||
"""Return host local handler."""
|
"""Return host local handler."""
|
||||||
return self._local
|
return self._info
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supperted_features(self):
|
def supperted_features(self):
|
||||||
@ -51,7 +51,7 @@ class HostManager(CoreSysAttributes):
|
|||||||
async def load(self):
|
async def load(self):
|
||||||
"""Load host functions."""
|
"""Load host functions."""
|
||||||
if self.sys_dbus.hostname.is_connected:
|
if self.sys_dbus.hostname.is_connected:
|
||||||
await self.local.update()
|
await self.info.update()
|
||||||
|
|
||||||
def reload(self):
|
def reload(self):
|
||||||
"""Reload host information."""
|
"""Reload host information."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user