Functions | |
| vol.Schema | default_schema (BaseAsyncGateway gateway, ChildSensor child, ValueType value_type_name) |
| None | discover_mysensors_node (HomeAssistant hass, GatewayId gateway_id, int node_id) |
| None | discover_mysensors_platform (HomeAssistant hass, GatewayId gateway_id, str platform, list[DevId] new_devices) |
| vol.Schema | get_child_schema (BaseAsyncGateway gateway, ChildSensor child, ValueType value_type_name, dict schema) |
| str | invalid_msg (BaseAsyncGateway gateway, ChildSensor child, ValueType value_type_name) |
| vol.Schema | light_dimmer_schema (BaseAsyncGateway gateway, ChildSensor child, ValueType value_type_name) |
| vol.Schema | light_percentage_schema (BaseAsyncGateway gateway, ChildSensor child, ValueType value_type_name) |
| vol.Schema | light_rgb_schema (BaseAsyncGateway gateway, ChildSensor child, ValueType value_type_name) |
| vol.Schema | light_rgbw_schema (BaseAsyncGateway gateway, ChildSensor child, ValueType value_type_name) |
| None | on_unload (HomeAssistant hass, GatewayId gateway_id, Callable fnct) |
| vol.Schema | switch_ir_send_schema (BaseAsyncGateway gateway, ChildSensor child, ValueType value_type_name) |
| defaultdict[Platform, list[DevId]] | validate_child (GatewayId gateway_id, BaseAsyncGateway gateway, int node_id, ChildSensor child, int|None value_type=None) |
| bool | validate_node (BaseAsyncGateway gateway, int node_id) |
| dict[Platform, list[DevId]] | validate_set_msg (GatewayId gateway_id, Message msg) |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
Helper functions for mysensors package.
| vol.Schema homeassistant.components.mysensors.helpers.default_schema | ( | BaseAsyncGateway | gateway, |
| ChildSensor | child, | ||
| ValueType | value_type_name | ||
| ) |
Return a default validation schema for value types.
Definition at line 94 of file helpers.py.
| None homeassistant.components.mysensors.helpers.discover_mysensors_node | ( | HomeAssistant | hass, |
| GatewayId | gateway_id, | ||
| int | node_id | ||
| ) |
Discover a MySensors node.
Definition at line 74 of file helpers.py.
| None homeassistant.components.mysensors.helpers.discover_mysensors_platform | ( | HomeAssistant | hass, |
| GatewayId | gateway_id, | ||
| str | platform, | ||
| list[DevId] | new_devices | ||
| ) |
Discover a MySensors platform.
Definition at line 57 of file helpers.py.
| vol.Schema homeassistant.components.mysensors.helpers.get_child_schema | ( | BaseAsyncGateway | gateway, |
| ChildSensor | child, | ||
| ValueType | value_type_name, | ||
| dict | schema | ||
| ) |
Return a child schema.
Definition at line 147 of file helpers.py.
| str homeassistant.components.mysensors.helpers.invalid_msg | ( | BaseAsyncGateway | gateway, |
| ChildSensor | child, | ||
| ValueType | value_type_name | ||
| ) |
Return a message for an invalid child during schema validation.
Definition at line 167 of file helpers.py.
| vol.Schema homeassistant.components.mysensors.helpers.light_dimmer_schema | ( | BaseAsyncGateway | gateway, |
| ChildSensor | child, | ||
| ValueType | value_type_name | ||
| ) |
Return a validation schema for V_DIMMER.
Definition at line 103 of file helpers.py.
| vol.Schema homeassistant.components.mysensors.helpers.light_percentage_schema | ( | BaseAsyncGateway | gateway, |
| ChildSensor | child, | ||
| ValueType | value_type_name | ||
| ) |
Return a validation schema for V_PERCENTAGE.
Definition at line 112 of file helpers.py.
| vol.Schema homeassistant.components.mysensors.helpers.light_rgb_schema | ( | BaseAsyncGateway | gateway, |
| ChildSensor | child, | ||
| ValueType | value_type_name | ||
| ) |
Return a validation schema for V_RGB.
Definition at line 121 of file helpers.py.
| vol.Schema homeassistant.components.mysensors.helpers.light_rgbw_schema | ( | BaseAsyncGateway | gateway, |
| ChildSensor | child, | ||
| ValueType | value_type_name | ||
| ) |
Return a validation schema for V_RGBW.
Definition at line 130 of file helpers.py.
| None homeassistant.components.mysensors.helpers.on_unload | ( | HomeAssistant | hass, |
| GatewayId | gateway_id, | ||
| Callable | fnct | ||
| ) |
Register a callback to be called when entry is unloaded. This function is used by platforms to cleanup after themselves.
Definition at line 45 of file helpers.py.
| vol.Schema homeassistant.components.mysensors.helpers.switch_ir_send_schema | ( | BaseAsyncGateway | gateway, |
| ChildSensor | child, | ||
| ValueType | value_type_name | ||
| ) |
Return a validation schema for V_IR_SEND.
Definition at line 139 of file helpers.py.
| defaultdict[Platform, list[DevId]] homeassistant.components.mysensors.helpers.validate_child | ( | GatewayId | gateway_id, |
| BaseAsyncGateway | gateway, | ||
| int | node_id, | ||
| ChildSensor | child, | ||
| int | None | value_type = None |
||
| ) |
Validate a child. Returns a dict mapping hass platform names to list of DevId.
Definition at line 194 of file helpers.py.
| bool homeassistant.components.mysensors.helpers.validate_node | ( | BaseAsyncGateway | gateway, |
| int | node_id | ||
| ) |
Validate a node.
Definition at line 186 of file helpers.py.
| dict[Platform, list[DevId]] homeassistant.components.mysensors.helpers.validate_set_msg | ( | GatewayId | gateway_id, |
| Message | msg | ||
| ) |
Validate a set message.
Definition at line 176 of file helpers.py.
|
private |
Definition at line 38 of file helpers.py.