1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 20:35:55 +00:00

add hostmanager

This commit is contained in:
Pascal Vizeli
2018-04-22 17:59:41 +02:00
parent 8f357739ec
commit 63b9e023b4
4 changed files with 47 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ class CoreSys:
self._updater = None
self._snapshots = None
self._tasks = None
self._host = None
self._services = None
self._discovery = None
self._alsa = None
@@ -229,6 +230,18 @@ class CoreSys:
raise RuntimeError("ALSA already set!")
self._alsa = value
@property
def host(self):
"""Return HostManager object."""
return self._host
@host.setter
def host(self, value):
"""Set a HostManager object."""
if self._host:
raise RuntimeError("HostManager already set!")
self._host = value
async def run_in_executor(self, funct, *args):
"""Wrapper for executor pool."""
return self._loop.run_in_executor(None, funct, *args)