homecontrol module

The core instance for HomeControl

class homecontrol.core.Core(cfg: dict, cfg_file: str, loop: Optional[asyncio.events.AbstractEventLoop] = None, start_args: Optional[Dict[KT, VT]] = None)[source]

Bases: object

Represents the root object for HomeControl

coroutine block_until_stop() → int[source]

Blocking method to keep HomeControl running until Core.block_future is done

Also triggers the stop coroutine when block_future has a result

coroutine bootstrap() → None[source]

Startup coroutine for Core

restart() → None[source]

Restarts HomeControl

shutdown() → None[source]

Shuts HomeControl down

coroutine stop() → None[source]

Stops HomeControl

Constants used by HomeControl

class homecontrol.const.ItemStatus[source]

Bases: enum.Enum

Every status an item can have

OFFLINE = 'offline'
ONLINE = 'online'
STOPPED = 'stopped'
WAITING_FOR_DEPENDENCY = 'waiting-for-dependency'

Exceptions

exception homecontrol.exceptions.ConfigDomainAlreadyRegistered[source]

Bases: homecontrol.exceptions.HomeControlException

The configuration domain is already registered

exception homecontrol.exceptions.ConfigurationNotApproved[source]

Bases: homecontrol.exceptions.HomeControlException

Configuration has not been approved

exception homecontrol.exceptions.HomeControlException[source]

Bases: BaseException

The base exception for HomeControl

exception homecontrol.exceptions.ItemNotFoundException[source]

Bases: homecontrol.exceptions.HomeControlException

Item not found

exception homecontrol.exceptions.ItemNotOnlineError[source]

Bases: homecontrol.exceptions.HomeControlException

Item is not online

exception homecontrol.exceptions.ItemTypeNotExistsError[source]

Bases: homecontrol.exceptions.HomeControlException

Item type does not exist

exception homecontrol.exceptions.ModuleNotFoundException[source]

Bases: homecontrol.exceptions.HomeControlException

Module not found

exception homecontrol.exceptions.PipInstallError[source]

Bases: homecontrol.exceptions.HomeControlException

A pip install failed