enhomie.homie.threads package#

Subpackages#

Submodules#

enhomie.homie.threads.action module#

Functions and routines associated with Enasis Network Homie Automate.

This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.

class enhomie.homie.threads.action.HomieAction(member: HomieMember, origin: HomieOrigin)[source]#

Bases: HomieThread

Common methods and routines for Homie Automate threads.

execute(aitem: HomieActionItem) None[source]#

Perform the operation related to Homie service threads.

Parameters:

aitem – Item containing information for operation.

property member: HomieActions#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Homie service threads.

class enhomie.homie.threads.action.HomieActionItem(origin: HomieOrigin, target: HomieGroup | HomieDevice, *, state: HomieState | None = None, color: str | Color | None = None, level: int | None = None, scene: HomieScene | None = None)[source]#

Bases: HomieThreadItem

Contain information for sharing using the Python queue.

color: Color | None = None#
device: str | None = None#
group: str | None = None#
level: int | None = None#
scene: str | None = None#
state: HomieState | None = None#

enhomie.homie.threads.stream module#

Functions and routines associated with Enasis Network Homie Automate.

This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.

class enhomie.homie.threads.stream.HomieStream(member: HomieMember, origin: HomieOrigin)[source]#

Bases: HomieThread

Common methods and routines for Homie Automate threads.

property member: HomieStreams#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Homie service threads.

operate_streams() None[source]#

Perform the operation related to Homie service threads.

class enhomie.homie.threads.stream.HomieStreamItem(origin: HomieOrigin, event: dict[str, Any])[source]#

Bases: HomieThreadItem

Contain information for sharing using the Python queue.

event: dict[str, Any]#

enhomie.homie.threads.thread module#

Functions and routines associated with Enasis Network Homie Automate.

This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.

class enhomie.homie.threads.thread.HomieThread(member: HomieMember, origin: HomieOrigin)[source]#

Bases: Thread

Common methods and routines for Homie Automate threads.

Parameters:
  • member – Child class instance for Homie Automate.

  • origin – Child class instance for Homie Automate.

property aqueue: HomieQueue[HomieActionItem]#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property congest: list[tuple[str, int]]#

Return the list of congested threads and members queues.

Returns:

List of congested threads and members queues.

property enqueue: list[tuple[str, int]]#

Return the list of congested threads and members queues.

Returns:

List of congested threads and members queues.

expired(item: HomieThreadItem) bool[source]#

Return the boolean indicating whether the item expired.

Parameters:

item – Item containing information for operation.

Returns:

Boolean indicating whether the item expired.

property homie: Homie#

Return the Homie instance to which the instance belongs.

Returns:

Homie instance to which the instance belongs.

property member: HomieMember#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Homie service threads.

operate_updates() None[source]#

Perform the operation related to Homie service threads.

property origin: HomieOrigin#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

run() None[source]#

Perform whatever operation is associated with the class.

property service: HomieService#

Return the Homie instance to which the instance belongs.

Returns:

Homie instance to which the instance belongs.

property squeue: HomieQueue[HomieStreamItem]#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

stop() None[source]#

Wait for the thread object to complete routine and exit.

property uqueue: HomieQueue[HomieUpdateItem]#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

class enhomie.homie.threads.thread.HomieThreadItem(origin: HomieOrigin)[source]#

Bases: HomieQueueItem

Contain information for sharing using the Python queue.

origin: str#

enhomie.homie.threads.update module#

Functions and routines associated with Enasis Network Homie Automate.

This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.

class enhomie.homie.threads.update.HomieUpdate(*args: Any, **kwargs: Any)[source]#

Bases: HomieThread

Common methods and routines for Homie Automate threads.

property member: HomieUpdates#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Homie service threads.

operate_updates() None[source]#

Perform the operation related to Homie service threads.

class enhomie.homie.threads.update.HomieUpdateItem(origin: HomieOrigin)[source]#

Bases: HomieThreadItem

Contain information for sharing using the Python queue.

Module contents#

Functions and routines associated with Enasis Network Homie Automate.

This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.

class enhomie.homie.threads.HomieAction(member: HomieMember, origin: HomieOrigin)[source]#

Bases: HomieThread

Common methods and routines for Homie Automate threads.

execute(aitem: HomieActionItem) None[source]#

Perform the operation related to Homie service threads.

Parameters:

aitem – Item containing information for operation.

property member: HomieActions#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Homie service threads.

class enhomie.homie.threads.HomieActionItem(origin: HomieOrigin, target: HomieGroup | HomieDevice, *, state: HomieState | None = None, color: str | Color | None = None, level: int | None = None, scene: HomieScene | None = None)[source]#

Bases: HomieThreadItem

Contain information for sharing using the Python queue.

color: Color | None = None#
device: str | None = None#
group: str | None = None#
level: int | None = None#
origin: str#
scene: str | None = None#
state: HomieState | None = None#
time: Time#
class enhomie.homie.threads.HomieStream(member: HomieMember, origin: HomieOrigin)[source]#

Bases: HomieThread

Common methods and routines for Homie Automate threads.

property member: HomieStreams#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Homie service threads.

operate_streams() None[source]#

Perform the operation related to Homie service threads.

class enhomie.homie.threads.HomieStreamItem(origin: HomieOrigin, event: dict[str, Any])[source]#

Bases: HomieThreadItem

Contain information for sharing using the Python queue.

event: dict[str, Any]#
origin: str#
time: Time#
class enhomie.homie.threads.HomieThread(member: HomieMember, origin: HomieOrigin)[source]#

Bases: Thread

Common methods and routines for Homie Automate threads.

Parameters:
  • member – Child class instance for Homie Automate.

  • origin – Child class instance for Homie Automate.

property aqueue: HomieQueue[HomieActionItem]#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

property congest: list[tuple[str, int]]#

Return the list of congested threads and members queues.

Returns:

List of congested threads and members queues.

property enqueue: list[tuple[str, int]]#

Return the list of congested threads and members queues.

Returns:

List of congested threads and members queues.

expired(item: HomieThreadItem) bool[source]#

Return the boolean indicating whether the item expired.

Parameters:

item – Item containing information for operation.

Returns:

Boolean indicating whether the item expired.

property homie: Homie#

Return the Homie instance to which the instance belongs.

Returns:

Homie instance to which the instance belongs.

property member: HomieMember#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Homie service threads.

operate_updates() None[source]#

Perform the operation related to Homie service threads.

property origin: HomieOrigin#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

run() None[source]#

Perform whatever operation is associated with the class.

property service: HomieService#

Return the Homie instance to which the instance belongs.

Returns:

Homie instance to which the instance belongs.

property squeue: HomieQueue[HomieStreamItem]#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

stop() None[source]#

Wait for the thread object to complete routine and exit.

property uqueue: HomieQueue[HomieUpdateItem]#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

class enhomie.homie.threads.HomieThreadItem(origin: HomieOrigin)[source]#

Bases: HomieQueueItem

Contain information for sharing using the Python queue.

origin: str#
time: Time#
class enhomie.homie.threads.HomieUpdate(*args: Any, **kwargs: Any)[source]#

Bases: HomieThread

Common methods and routines for Homie Automate threads.

property member: HomieUpdates#

Return the value for the attribute from class instance.

Returns:

Value for the attribute from class instance.

operate() None[source]#

Perform the operation related to Homie service threads.

operate_updates() None[source]#

Perform the operation related to Homie service threads.

class enhomie.homie.threads.HomieUpdateItem(origin: HomieOrigin)[source]#

Bases: HomieThreadItem

Contain information for sharing using the Python queue.