enhomie.homie.childs package#
Subpackages#
- enhomie.homie.childs.test package
- Submodules
- enhomie.homie.childs.test.test_aspire module
- enhomie.homie.childs.test.test_child module
- enhomie.homie.childs.test.test_desire module
- enhomie.homie.childs.test.test_device module
- enhomie.homie.childs.test.test_group module
- enhomie.homie.childs.test.test_homie module
- enhomie.homie.childs.test.test_origin module
- enhomie.homie.childs.test.test_scene module
- Module contents
Submodules#
enhomie.homie.childs.aspire 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.childs.aspire.HomieAspire(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Match specific conditions for determining desired state.
- property devices: list[HomieDevice]#
Return the value for the attribute from class instance.
Note
This method is identical to same within HomieDesire.
- Returns:
Value for the attribute from class instance.
- property groups: list[HomieGroup]#
Return the value for the attribute from class instance.
Note
This method is identical to same within HomieDesire.
- Returns:
Value for the attribute from class instance.
- property kind: Literal['aspire']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- matched() None [source]#
Perform operations when this desire is the most desired.
Note
Somewhat similar to same method within HomieDesire.
- property occurs: list[HomieOccur]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieAspireParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property paused: bool#
Return the boolean indicating whether operation delayed.
Note
Somewhat similar to same method within HomieDesire.
- Returns:
Boolean indicating whether operation delayed.
- when(sitem: HomieStreamItem) bool [source]#
Return the boolean indicating the conditional outcomes.
Note
Somewhat similar to same method within HomieDesire.
- Parameters:
sitem – Item containing information for operation.
- Returns:
Boolean indicating the conditional outcomes.
- property wheres: list[HomieWhere]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
enhomie.homie.childs.child 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.childs.child.HomieChild(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
object
Parent object for child objects within the project base.
- Parameters:
homie – Primary class instance for Homie Automate.
name – Name of the object within the Homie config.
params – Parameters used to instantiate the class.
- property dumped: dict[str, Any]#
Return the facts about the attributes from the instance.
- Returns:
Facts about the attributes from the instance.
- property family: HomieFamily#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property homie: Homie#
Return the Homie instance to which the instance belongs.
- Returns:
Homie instance to which the instance belongs.
- property kind: HomieKinds#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property name: str#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieChildParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
enhomie.homie.childs.desire 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.childs.desire.HomieDesire(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Match specific conditions for determining desired state.
- property devices: list[HomieDevice]#
Return the value for the attribute from class instance.
Note
This method is identical to same within HomieAspire.
- Returns:
Value for the attribute from class instance.
- property groups: list[HomieGroup]#
Return the value for the attribute from class instance.
Note
This method is identical to same within HomieAspire.
- Returns:
Value for the attribute from class instance.
- property kind: Literal['desire']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- matched(target: HomieActionNode) None [source]#
Perform operations when this desire is the most desired.
Note
Somewhat similar to same method within HomieAspire.
- Parameters:
target – Device or group that in scope for match.
- omitted(target: HomieActionNode | None = None) None [source]#
Perform operations when this desire is the most desired.
Note
Somewhat similar to same method within HomieAspire.
- Parameters:
target – Device or group that in scope for match.
- property params: HomieDesireParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- paused(target: HomieActionNode) bool [source]#
Return the boolean indicating whether operation delayed.
Note
This method is identical to same within HomieAspire.
- Parameters:
target – Device or group that in scope for match.
- Returns:
Boolean indicating whether operation delayed.
- property weight: int#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- when(time: Time) bool [source]#
Return the boolean indicating the conditional outcomes.
Note
Somewhat similar to same method within HomieAspire.
- Parameters:
time – Time that will be used in the conditionals.
- Returns:
Boolean indicating the conditional outcomes.
- property wheres: list[HomieWhere]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
enhomie.homie.childs.device 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.childs.device.HomieDevice(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Normalize the desired parameters with multiple products.
- property dumped: dict[str, Any]#
Return the facts about the attributes from the instance.
- Returns:
Facts about the attributes from the instance.
- property kind: Literal['device']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property origin: HomieOrigin#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieDeviceParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
enhomie.homie.childs.group 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.childs.group.HomieGroup(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Normalize the desired parameters with multiple products.
- property dumped: dict[str, Any]#
Return the facts about the attributes from the instance.
- Returns:
Facts about the attributes from the instance.
- property kind: Literal['group']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property origin: HomieOrigin | None#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieGroupParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
enhomie.homie.childs.helpers 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.
- enhomie.homie.childs.helpers.occurd(aspire: HomieAspire, sitem: HomieStreamItem) tuple[bool, ...] [source]#
Return the boolean indicating the conditional outcomes.
- Parameters:
aspire – Child class instance for Homie Automate.
sitem – Item containing information for operation.
- Returns:
Boolean indicating the conditional outcomes.
- enhomie.homie.childs.helpers.whered(desire: HomieDesire | HomieAspire, time: Time) tuple[bool, ...] [source]#
Return the boolean indicating the conditional outcomes.
- Parameters:
desire – Child class instance for Homie Automate.
time – Time that will be used in the conditionals.
- Returns:
Boolean indicating the conditional outcomes.
enhomie.homie.childs.homie 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.childs.homie.HomieChilds(homie: Homie)[source]#
Bases:
object
Contain the object instances for related Homie children.
- Parameters:
homie – Primary class instance for Homie Automate.
- property aspires: dict[str, HomieAspire]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property desires: dict[str, HomieDesire]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property devices: dict[str, HomieDevice]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property dumped: dict[str, Any]#
Return the facts about the attributes from the instance.
- Returns:
Facts about the attributes from the instance.
- get_device(name: str) Type[HomieDevice] [source]#
Return the Homie class definition for its instantiation.
- Parameters:
name – Name of the object within the Homie config.
- Returns:
Homie class definition for its instantiation.
- get_origin(name: str) Type[HomieOrigin] [source]#
Return the Homie class definition for its instantiation.
- Parameters:
name – Name of the object within the Homie config.
- Returns:
Homie class definition for its instantiation.
- property groups: dict[str, HomieGroup]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property origins: dict[str, HomieOrigin]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property scenes: dict[str, HomieScene]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
enhomie.homie.childs.origin 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.childs.origin.HomieOrigin(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Normalize the desired parameters with multiple products.
- property dumped: dict[str, Any]#
Return the facts about the attributes from the instance.
- Returns:
Facts about the attributes from the instance.
- property family: HomieFamily#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- get_action(target: HomieActionNode, *, state: HomieState | None = None, color: str | Color | None = None, level: int | None = None, scene: str | HomieScene | None = None) HomieActionItem [source]#
Return the new item containing information for operation.
- Parameters:
target – Device or group settings will be updated.
state – Determine the state related to the target.
color – Determine the color related to the target.
level – Determine the level related to the target.
scene – Determine the scene related to the target.
- Returns:
New item containing information for operation.
- get_stream(event: dict[str, Any]) HomieStreamItem [source]#
Return the new item containing information for operation.
- Parameters:
event – Event from the stream for creating object.
- Returns:
New item containing information for operation.
- get_update() HomieUpdateItem [source]#
Return the new item containing information for operation.
- Returns:
New item containing information for operation.
- property kind: Literal['origin']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieOriginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- put_action(aqueue: HomieQueue[HomieActionItem], target: HomieActionNode, *, state: HomieState | None = None, color: str | Color | None = None, level: int | None = None, scene: str | HomieScene | None = None) None [source]#
Insert the new item containing information for operation.
- Parameters:
aqueue – Queue instance where the item is received.
target – Device or group settings will be updated.
state – Determine the state related to the target.
color – Determine the color related to the target.
level – Determine the level related to the target.
scene – Determine the scene related to the target.
- put_stream(squeue: HomieQueue[HomieStreamItem], event: dict[str, Any]) None [source]#
Insert the new item containing information for operation.
- Parameters:
squeue – Queue instance where the item is received.
event – Event from the stream for creating object.
- put_update(uqueue: HomieQueue[HomieUpdateItem]) None [source]#
Insert the new item containing information for operation.
- Parameters:
uqueue – Queue instance where the item is received.
- refresh(timeout: int | None = None) bool [source]#
Refresh the cached information for the remote upstream.
- Parameters:
timeout – Timeout waiting for the server response.
- Returns:
Boolean indicating the success of the refresh.
- set_action(target: HomieActionNode, aitem: HomieActionItem, force: bool = False, change: bool = True, timeout: int | None = None) bool [source]#
Perform the provided action with specified Homie target.
- Parameters:
target – Device or group settings will be updated.
aitem – Item containing information for operation.
force – Override the default for full idempotency.
change – Determine whether the change is executed.
timeout – Timeout waiting for the server response.
- Returns:
Boolean indicating whether or not was changed.
- set_update(uitem: HomieUpdateBase) bool [source]#
Replace or update internal configuration with provided.
- Parameters:
uitem – Item containing information for operation.
- Returns:
Boolean indicating whether or not was changed.
- source(kind: HomieKinds | None = None, unique: str | None = None, label: str | None = None, relate: HomieActionNode | None = None) dict[str, Any] | None [source]#
Return the content related to the item in parent system.
- Parameters:
kind – Which kind of Homie object will be located.
unique – Unique identifier within parents system.
label – Friendly name or label within the parent.
relate – Child class instance for Homie Automate.
- Returns:
Content related to the item in parent system.
enhomie.homie.childs.scene 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.childs.scene.HomieScene(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Normalize the desired parameters with multiple products.
- property kind: Literal['scene']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieSceneParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- source(origin: HomieOrigin, relate: HomieActionNode | None = None) dict[str, Any] | None [source]#
Return the content related to the item in parent system.
- Parameters:
origin – Child class instance for Homie Automate.
relate – Child class instance for Homie Automate.
- Returns:
Content related to the item in parent system.
- stage(device: HomieDevice | None = None) HomieStage [source]#
Return the configuration for the device or the defaults.
- Parameters:
device – Child class instance for Homie Automate.
- Returns:
Configuration for the device or the defaults.
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.childs.HomieAspire(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Match specific conditions for determining desired state.
- property devices: list[HomieDevice]#
Return the value for the attribute from class instance.
Note
This method is identical to same within HomieDesire.
- Returns:
Value for the attribute from class instance.
- property groups: list[HomieGroup]#
Return the value for the attribute from class instance.
Note
This method is identical to same within HomieDesire.
- Returns:
Value for the attribute from class instance.
- property kind: Literal['aspire']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- matched() None [source]#
Perform operations when this desire is the most desired.
Note
Somewhat similar to same method within HomieDesire.
- property occurs: list[HomieOccur]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieAspireParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property paused: bool#
Return the boolean indicating whether operation delayed.
Note
Somewhat similar to same method within HomieDesire.
- Returns:
Boolean indicating whether operation delayed.
- when(sitem: HomieStreamItem) bool [source]#
Return the boolean indicating the conditional outcomes.
Note
Somewhat similar to same method within HomieDesire.
- Parameters:
sitem – Item containing information for operation.
- Returns:
Boolean indicating the conditional outcomes.
- property wheres: list[HomieWhere]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- class enhomie.homie.childs.HomieChild(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
object
Parent object for child objects within the project base.
- Parameters:
homie – Primary class instance for Homie Automate.
name – Name of the object within the Homie config.
params – Parameters used to instantiate the class.
- property dumped: dict[str, Any]#
Return the facts about the attributes from the instance.
- Returns:
Facts about the attributes from the instance.
- property family: HomieFamily#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property homie: Homie#
Return the Homie instance to which the instance belongs.
- Returns:
Homie instance to which the instance belongs.
- property kind: HomieKinds#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property name: str#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieChildParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- class enhomie.homie.childs.HomieChilds(homie: Homie)[source]#
Bases:
object
Contain the object instances for related Homie children.
- Parameters:
homie – Primary class instance for Homie Automate.
- property aspires: dict[str, HomieAspire]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property desires: dict[str, HomieDesire]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property devices: dict[str, HomieDevice]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property dumped: dict[str, Any]#
Return the facts about the attributes from the instance.
- Returns:
Facts about the attributes from the instance.
- get_device(name: str) Type[HomieDevice] [source]#
Return the Homie class definition for its instantiation.
- Parameters:
name – Name of the object within the Homie config.
- Returns:
Homie class definition for its instantiation.
- get_origin(name: str) Type[HomieOrigin] [source]#
Return the Homie class definition for its instantiation.
- Parameters:
name – Name of the object within the Homie config.
- Returns:
Homie class definition for its instantiation.
- property groups: dict[str, HomieGroup]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property origins: dict[str, HomieOrigin]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property scenes: dict[str, HomieScene]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- class enhomie.homie.childs.HomieDesire(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Match specific conditions for determining desired state.
- property devices: list[HomieDevice]#
Return the value for the attribute from class instance.
Note
This method is identical to same within HomieAspire.
- Returns:
Value for the attribute from class instance.
- property groups: list[HomieGroup]#
Return the value for the attribute from class instance.
Note
This method is identical to same within HomieAspire.
- Returns:
Value for the attribute from class instance.
- property kind: Literal['desire']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- matched(target: HomieActionNode) None [source]#
Perform operations when this desire is the most desired.
Note
Somewhat similar to same method within HomieAspire.
- Parameters:
target – Device or group that in scope for match.
- omitted(target: HomieActionNode | None = None) None [source]#
Perform operations when this desire is the most desired.
Note
Somewhat similar to same method within HomieAspire.
- Parameters:
target – Device or group that in scope for match.
- property params: HomieDesireParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- paused(target: HomieActionNode) bool [source]#
Return the boolean indicating whether operation delayed.
Note
This method is identical to same within HomieAspire.
- Parameters:
target – Device or group that in scope for match.
- Returns:
Boolean indicating whether operation delayed.
- property weight: int#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- when(time: Time) bool [source]#
Return the boolean indicating the conditional outcomes.
Note
Somewhat similar to same method within HomieAspire.
- Parameters:
time – Time that will be used in the conditionals.
- Returns:
Boolean indicating the conditional outcomes.
- property wheres: list[HomieWhere]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- class enhomie.homie.childs.HomieDevice(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Normalize the desired parameters with multiple products.
- property dumped: dict[str, Any]#
Return the facts about the attributes from the instance.
- Returns:
Facts about the attributes from the instance.
- property kind: Literal['device']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property origin: HomieOrigin#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieDeviceParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- class enhomie.homie.childs.HomieGroup(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Normalize the desired parameters with multiple products.
- property dumped: dict[str, Any]#
Return the facts about the attributes from the instance.
- Returns:
Facts about the attributes from the instance.
- property kind: Literal['group']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property origin: HomieOrigin | None#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieGroupParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- class enhomie.homie.childs.HomieOrigin(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Normalize the desired parameters with multiple products.
- property dumped: dict[str, Any]#
Return the facts about the attributes from the instance.
- Returns:
Facts about the attributes from the instance.
- property family: HomieFamily#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- get_action(target: HomieActionNode, *, state: HomieState | None = None, color: str | Color | None = None, level: int | None = None, scene: str | HomieScene | None = None) HomieActionItem [source]#
Return the new item containing information for operation.
- Parameters:
target – Device or group settings will be updated.
state – Determine the state related to the target.
color – Determine the color related to the target.
level – Determine the level related to the target.
scene – Determine the scene related to the target.
- Returns:
New item containing information for operation.
- get_stream(event: dict[str, Any]) HomieStreamItem [source]#
Return the new item containing information for operation.
- Parameters:
event – Event from the stream for creating object.
- Returns:
New item containing information for operation.
- get_update() HomieUpdateItem [source]#
Return the new item containing information for operation.
- Returns:
New item containing information for operation.
- property kind: Literal['origin']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieOriginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- put_action(aqueue: HomieQueue[HomieActionItem], target: HomieActionNode, *, state: HomieState | None = None, color: str | Color | None = None, level: int | None = None, scene: str | HomieScene | None = None) None [source]#
Insert the new item containing information for operation.
- Parameters:
aqueue – Queue instance where the item is received.
target – Device or group settings will be updated.
state – Determine the state related to the target.
color – Determine the color related to the target.
level – Determine the level related to the target.
scene – Determine the scene related to the target.
- put_stream(squeue: HomieQueue[HomieStreamItem], event: dict[str, Any]) None [source]#
Insert the new item containing information for operation.
- Parameters:
squeue – Queue instance where the item is received.
event – Event from the stream for creating object.
- put_update(uqueue: HomieQueue[HomieUpdateItem]) None [source]#
Insert the new item containing information for operation.
- Parameters:
uqueue – Queue instance where the item is received.
- refresh(timeout: int | None = None) bool [source]#
Refresh the cached information for the remote upstream.
- Parameters:
timeout – Timeout waiting for the server response.
- Returns:
Boolean indicating the success of the refresh.
- set_action(target: HomieActionNode, aitem: HomieActionItem, force: bool = False, change: bool = True, timeout: int | None = None) bool [source]#
Perform the provided action with specified Homie target.
- Parameters:
target – Device or group settings will be updated.
aitem – Item containing information for operation.
force – Override the default for full idempotency.
change – Determine whether the change is executed.
timeout – Timeout waiting for the server response.
- Returns:
Boolean indicating whether or not was changed.
- set_update(uitem: HomieUpdateBase) bool [source]#
Replace or update internal configuration with provided.
- Parameters:
uitem – Item containing information for operation.
- Returns:
Boolean indicating whether or not was changed.
- source(kind: HomieKinds | None = None, unique: str | None = None, label: str | None = None, relate: HomieActionNode | None = None) dict[str, Any] | None [source]#
Return the content related to the item in parent system.
- Parameters:
kind – Which kind of Homie object will be located.
unique – Unique identifier within parents system.
label – Friendly name or label within the parent.
relate – Child class instance for Homie Automate.
- Returns:
Content related to the item in parent system.
- class enhomie.homie.childs.HomieScene(homie: Homie, name: str, params: HomieChildParams)[source]#
Bases:
HomieChild
Normalize the desired parameters with multiple products.
- property kind: Literal['scene']#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: HomieSceneParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- source(origin: HomieOrigin, relate: HomieActionNode | None = None) dict[str, Any] | None [source]#
Return the content related to the item in parent system.
- Parameters:
origin – Child class instance for Homie Automate.
relate – Child class instance for Homie Automate.
- Returns:
Content related to the item in parent system.
- stage(device: HomieDevice | None = None) HomieStage [source]#
Return the configuration for the device or the defaults.
- Parameters:
device – Child class instance for Homie Automate.
- Returns:
Configuration for the device or the defaults.