enrobie.plugins.enhomie package#
Submodules#
enrobie.plugins.enhomie.ainswer module#
- async enrobie.plugins.enhomie.ainswer.homie_persist(context: RunContext[AinswerDepends]) list[HomiePersistRecord][source]#
Return the current values in Homie Automate persistence.
Note
This tool will return values from the Homie Automate persistence store. They may include information about many things regarding the Robie owner home status.
- Returns:
Current values in Homie Automate persistence.
enrobie.plugins.enhomie.helpers module#
- enrobie.plugins.enhomie.helpers.composedsc(plugin: HomiePlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.enhomie.helpers.composeirc(plugin: HomiePlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.enhomie.helpers.composemtm(plugin: HomiePlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
enrobie.plugins.enhomie.params module#
- class enrobie.plugins.enhomie.params.HomiePluginCommandParams[source]#
Bases:
RobieParamsModelProcess and validate the Robie configuration parameters.
Fields# Field
Type
Required
Default
Constraints
No
'!persist'min_length=2
No
'!persist'min_length=2
No
'!persist'min_length=2
- irc: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='!persist', description='Command name for chat platform', metadata=[MinLen(min_length=2)])]#
- class enrobie.plugins.enhomie.params.HomiePluginParams[source]#
Bases:
RobiePluginParamsProcess and validate the Robie configuration parameters.
Fields# Field
Type
Required
Default
Constraints
Yes
min_length=1
No
factory
enableNo
FalselocateNo
Nonemin_length=1
No
Nonemin_length=1
Yes
min_length=1
No
Nonemin_length=1
No
TrueNo
factory
No
30ge=1, le=300
trustedNo
Nonemin_length=1
No
Nonemin_length=1
- command: Annotated[HomiePluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=HomiePluginCommandParams, description='Command name per chat platform')]#
- restful: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Where to find the RESTful API', examples=['http://localhost:8420'], metadata=[MinLen(min_length=1)])]#
- username: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
- password: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
- timeout: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=30, description='Timeout connecting to server', metadata=[Ge(ge=1), Le(le=300)])]#
- ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
- ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
- clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
- status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
enrobie.plugins.enhomie.persist module#
- class enrobie.plugins.enhomie.persist.HomiePersistRecord[source]#
Bases:
BaseModelInformation relevant to Homie Automate persistent value.
Fields# Field
Type
Required
Default
Constraints
No
Nonemin_length=1
No
Nonemin_length=1
No
Nonemin_length=20, max_length=32
Literal[‘failure’, ‘information’, ‘success’, ‘warning’] |NoneNo
Nonemin_length=1
No
Nonemin_length=1
Yes
min_length=1
Yes
min_length=20, max_length=32
Yes
No
Nonemin_length=1
No
Nonemin_length=1
- unique: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Unique key for the value', metadata=[MinLen(min_length=1)])]#
- value: Annotated[int | float | bool | str | None, FieldInfo(annotation=NoneType, required=True, description='Value stored at unique')]#
- value_unit: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Unit for persist value', metadata=[MinLen(min_length=1)])]#
- value_label: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Label for persist value', metadata=[MinLen(min_length=1)])]#
- about: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='About the persist entry', metadata=[MinLen(min_length=1)])]#
- about_label: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Label for persist entry', metadata=[MinLen(min_length=1)])]#
- level: Annotated[Literal['failure', 'information', 'success', 'warning'] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Severity of persist entry', metadata=[MinLen(min_length=1)])]#
- tags: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Tags for persist entry', metadata=[MinLen(min_length=1)])]#
- class enrobie.plugins.enhomie.persist.HomiePersist(plugin: HomiePlugin)[source]#
Bases:
objectCollect the information using the upstream API endpoint.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
- property client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- request() Response[source]#
Return the response from upstream API endpoint request.
- Parameters:
item – Determine which items will be enumerated.
- Returns:
Response from upstream API endpoint request.
- property records: list[HomiePersistRecord]#
Return the response from upstream API endpoint request.
- Returns:
Response from upstream API endpoint request.
- record(unique: str) HomiePersistRecord[source]#
Return the response from upstream API endpoint request.
- Parameters:
unique – Unique identifier from within the table.
- Returns:
Response from upstream API endpoint request.
enrobie.plugins.enhomie.plugin module#
- class enrobie.plugins.enhomie.plugin.HomiePlugin(robie: Robie, name: str, params: RobieChildParams)[source]#
Bases:
RobiePluginIntegrate with the Robie routine and perform operations.
Note
This plugin allows for connecting to Homie Automate.
- classmethod schema() Type[HomiePluginParams][source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property params: HomiePluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property persist: HomiePersist#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
Module contents#
- class enrobie.plugins.enhomie.HomiePlugin(robie: Robie, name: str, params: RobieChildParams)[source]#
Bases:
RobiePluginIntegrate with the Robie routine and perform operations.
Note
This plugin allows for connecting to Homie Automate.
- classmethod schema() Type[HomiePluginParams][source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property params: HomiePluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property persist: HomiePersist#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- class enrobie.plugins.enhomie.HomiePluginParams[source]#
Bases:
RobiePluginParamsProcess and validate the Robie configuration parameters.
Fields# Field
Type
Required
Default
Constraints
Yes
min_length=1
No
factory
enableNo
FalselocateNo
Nonemin_length=1
No
Nonemin_length=1
Yes
min_length=1
No
Nonemin_length=1
No
TrueNo
factory
No
30ge=1, le=300
trustedNo
Nonemin_length=1
No
Nonemin_length=1
- command: Annotated[HomiePluginCommandParams, FieldInfo(annotation=NoneType, required=False, default_factory=HomiePluginCommandParams, description='Command name per chat platform')]#
- restful: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Where to find the RESTful API', examples=['http://localhost:8420'], metadata=[MinLen(min_length=1)])]#
- username: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
- password: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Authenticate with the service', metadata=[MinLen(min_length=1)])]#
- timeout: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=30, description='Timeout connecting to server', metadata=[Ge(ge=1), Le(le=300)])]#
- ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
- ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
- clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
- status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#