enhomie.philips.params package#

Subpackages#

Submodules#

enhomie.philips.params.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.

pydantic model enhomie.philips.params.origin.PhueOriginParams[source]#

Bases: HomieParamsModel

Process and validate the Homie configuration parameters.

Show JSON schema
{
   "title": "PhueOriginParams",
   "description": "Process and validate the Homie configuration parameters.",
   "type": "object",
   "properties": {
      "bridge": {
         "$ref": "#/$defs/BridgeParams",
         "description": "Connection specific parameters"
      }
   },
   "$defs": {
      "BridgeParams": {
         "additionalProperties": false,
         "description": "Process and validate the class configuration parameters.",
         "properties": {
            "server": {
               "description": "Server address for connection",
               "minLength": 1,
               "title": "Server",
               "type": "string"
            },
            "timeout": {
               "default": 30,
               "description": "Timeout connecting to server",
               "maximum": 300,
               "minimum": 1,
               "title": "Timeout",
               "type": "integer"
            },
            "token": {
               "description": "Parameter for the integration",
               "minLength": 1,
               "title": "Token",
               "type": "string"
            },
            "ssl_verify": {
               "default": true,
               "description": "Verify the ceritifcate valid",
               "title": "Ssl Verify",
               "type": "boolean"
            },
            "ssl_capem": {
               "anyOf": [
                  {
                     "minLength": 1,
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Verify the ceritifcate valid",
               "title": "Ssl Capem"
            }
         },
         "required": [
            "server",
            "token"
         ],
         "title": "BridgeParams",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "bridge"
   ]
}

Config:
  • extra: str = forbid

Fields:
field bridge: Annotated[BridgeParams, FieldInfo(annotation=NoneType, required=True, description='Connection specific parameters')] [Required]#

Connection specific parameters

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.

pydantic model enhomie.philips.params.DriverPhueButtonParams[source]#

Bases: HomieParamsModel

Process and validate the Homie configuration parameters.

Show JSON schema
{
   "title": "DriverPhueButtonParams",
   "description": "Process and validate the Homie configuration parameters.",
   "type": "object",
   "properties": {
      "device": {
         "description": "Device that is in scope",
         "minLength": 1,
         "title": "Device",
         "type": "string"
      },
      "events": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "initial_press",
                     "long_release",
                     "short_release"
                  ],
                  "type": "string"
               },
               "minItems": 1,
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Events that will be matched",
         "title": "Events"
      },
      "sensor": {
         "description": "Sensor that will be matched",
         "enum": [
            "button1",
            "button2",
            "button3",
            "button4"
         ],
         "title": "Sensor",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "device",
      "sensor"
   ]
}

Config:
  • extra: str = forbid

Fields:
field device: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Device that is in scope', metadata=[MinLen(min_length=1)])] [Required]#

Device that is in scope

Constraints:
  • min_length = 1

field events: Annotated[list[Literal['initial_press', 'long_release', 'short_release']] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Events that will be matched', metadata=[MinLen(min_length=1)])] = None#

Events that will be matched

Constraints:
  • min_length = 1

field sensor: Annotated[Literal['button1', 'button2', 'button3', 'button4'], FieldInfo(annotation=NoneType, required=True, description='Sensor that will be matched')] [Required]#

Sensor that will be matched

pydantic model enhomie.philips.params.DriverPhueChangeParams[source]#

Bases: HomieParamsModel

Process and validate the Homie configuration parameters.

Show JSON schema
{
   "title": "DriverPhueChangeParams",
   "description": "Process and validate the Homie configuration parameters.",
   "type": "object",
   "properties": {
      "devices": {
         "description": "Devices that are in scope",
         "items": {
            "type": "string"
         },
         "minItems": 1,
         "title": "Devices",
         "type": "array"
      },
      "sensors": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "button1",
                     "button2",
                     "button3",
                     "button4",
                     "contact",
                     "motion",
                     "temperature"
                  ],
                  "type": "string"
               },
               "minItems": 1,
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Sensors that will be matched",
         "title": "Sensors"
      },
      "since": {
         "default": 0,
         "description": "Minimum time since changed",
         "minimum": 0,
         "title": "Since",
         "type": "integer"
      }
   },
   "additionalProperties": false,
   "required": [
      "devices"
   ]
}

Config:
  • extra: str = forbid

Fields:
field devices: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='Devices that are in scope', metadata=[MinLen(min_length=1)])] [Required]#

Devices that are in scope

Constraints:
  • min_length = 1

field sensors: Annotated[list[Literal['button1', 'button2', 'button3', 'button4', 'contact', 'motion', 'temperature']] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Sensors that will be matched', metadata=[MinLen(min_length=1)])] = None#

Sensors that will be matched

Constraints:
  • min_length = 1

field since: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=0, description='Minimum time since changed', metadata=[Ge(ge=0)])] = 0#

Minimum time since changed

Constraints:
  • ge = 0

pydantic model enhomie.philips.params.DriverPhueContactParams[source]#

Bases: HomieParamsModel

Process and validate the Homie configuration parameters.

Show JSON schema
{
   "title": "DriverPhueContactParams",
   "description": "Process and validate the Homie configuration parameters.",
   "type": "object",
   "properties": {
      "device": {
         "description": "Device that is in scope",
         "minLength": 1,
         "title": "Device",
         "type": "string"
      },
      "states": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "contact",
                     "no_contact"
                  ],
                  "type": "string"
               },
               "minItems": 1,
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "States that will be matched",
         "title": "States"
      }
   },
   "additionalProperties": false,
   "required": [
      "device"
   ]
}

Config:
  • extra: str = forbid

Fields:
field device: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Device that is in scope', metadata=[MinLen(min_length=1)])] [Required]#

Device that is in scope

Constraints:
  • min_length = 1

field states: Annotated[list[Literal['contact', 'no_contact']] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='States that will be matched', metadata=[MinLen(min_length=1)])] = None#

States that will be matched

Constraints:
  • min_length = 1

pydantic model enhomie.philips.params.DriverPhueMotionParams[source]#

Bases: HomieParamsModel

Process and validate the Homie configuration parameters.

Show JSON schema
{
   "title": "DriverPhueMotionParams",
   "description": "Process and validate the Homie configuration parameters.",
   "type": "object",
   "properties": {
      "device": {
         "description": "Device that is in scope",
         "minLength": 1,
         "title": "Device",
         "type": "string"
      },
      "states": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "motion",
                     "no_motion"
                  ],
                  "type": "string"
               },
               "minItems": 1,
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "States that will be matched",
         "title": "States"
      }
   },
   "additionalProperties": false,
   "required": [
      "device"
   ]
}

Config:
  • extra: str = forbid

Fields:
field device: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Device that is in scope', metadata=[MinLen(min_length=1)])] [Required]#

Device that is in scope

Constraints:
  • min_length = 1

field states: Annotated[list[Literal['motion', 'no_motion']] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='States that will be matched', metadata=[MinLen(min_length=1)])] = None#

States that will be matched

Constraints:
  • min_length = 1

pydantic model enhomie.philips.params.DriverPhueSceneParams[source]#

Bases: HomieParamsModel

Process and validate the Homie configuration parameters.

Show JSON schema
{
   "title": "DriverPhueSceneParams",
   "description": "Process and validate the Homie configuration parameters.",
   "type": "object",
   "properties": {
      "scene": {
         "description": "Scene that is in scope",
         "minLength": 1,
         "title": "Scene",
         "type": "string"
      },
      "group": {
         "description": "Group that is in scope",
         "minLength": 1,
         "title": "Group",
         "type": "string"
      },
      "states": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "active",
                     "inactive"
                  ],
                  "type": "string"
               },
               "minItems": 1,
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "States that will be matched",
         "title": "States"
      }
   },
   "additionalProperties": false,
   "required": [
      "scene",
      "group"
   ]
}

Config:
  • extra: str = forbid

Fields:
field group: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Group that is in scope', metadata=[MinLen(min_length=1)])] [Required]#

Group that is in scope

Constraints:
  • min_length = 1

field scene: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Scene that is in scope', metadata=[MinLen(min_length=1)])] [Required]#

Scene that is in scope

Constraints:
  • min_length = 1

field states: Annotated[list[Literal['active', 'inactive']] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='States that will be matched', metadata=[MinLen(min_length=1)])] = None#

States that will be matched

Constraints:
  • min_length = 1

pydantic model enhomie.philips.params.PhueOriginParams[source]#

Bases: HomieParamsModel

Process and validate the Homie configuration parameters.

Show JSON schema
{
   "title": "PhueOriginParams",
   "description": "Process and validate the Homie configuration parameters.",
   "type": "object",
   "properties": {
      "bridge": {
         "$ref": "#/$defs/BridgeParams",
         "description": "Connection specific parameters"
      }
   },
   "$defs": {
      "BridgeParams": {
         "additionalProperties": false,
         "description": "Process and validate the class configuration parameters.",
         "properties": {
            "server": {
               "description": "Server address for connection",
               "minLength": 1,
               "title": "Server",
               "type": "string"
            },
            "timeout": {
               "default": 30,
               "description": "Timeout connecting to server",
               "maximum": 300,
               "minimum": 1,
               "title": "Timeout",
               "type": "integer"
            },
            "token": {
               "description": "Parameter for the integration",
               "minLength": 1,
               "title": "Token",
               "type": "string"
            },
            "ssl_verify": {
               "default": true,
               "description": "Verify the ceritifcate valid",
               "title": "Ssl Verify",
               "type": "boolean"
            },
            "ssl_capem": {
               "anyOf": [
                  {
                     "minLength": 1,
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Verify the ceritifcate valid",
               "title": "Ssl Capem"
            }
         },
         "required": [
            "server",
            "token"
         ],
         "title": "BridgeParams",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "bridge"
   ]
}

Config:
  • extra: str = forbid

Fields:
field bridge: Annotated[BridgeParams, FieldInfo(annotation=NoneType, required=True, description='Connection specific parameters')] [Required]#

Connection specific parameters