|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Shared ESPHome codegen for IO-Homecontrol device-bound platforms. More...
Go to the source code of this file.
Namespaces | |
| namespace | home_io_control |
| namespace | home_io_control.platform_common |
Functions | |
| home_io_control.platform_common._companion_sensor_name (config, suffix) | |
| home_io_control.platform_common.companion_id_base (config, parent_id_key) | |
| home_io_control.platform_common.inject_companion_sensor_ids (config, parent_id_key) | |
| home_io_control.platform_common.platform_schema_extension () | |
| home_io_control.platform_common.wire_device_binding (var, parent, config) | |
| home_io_control.platform_common._create_companion_text_sensor (config, parent, sensor_id, name, disabled_by_default) | |
| home_io_control.platform_common._create_link_health_sensor (config, parent, sensor_id, name, **sensor_kwargs) | |
| home_io_control.platform_common.create_companion_sensors (config, parent) | |
Shared ESPHome codegen for IO-Homecontrol device-bound platforms.
cover.py, light.py, switch.py and lock.py all bind an ESPHome entity to a hub device: the same config keys, the same auto-generated companion diagnostic sensors (device name, active issue, RSSI, last contact, exchange failures), and the same to_code() wiring (set_parent / set_device_id / device type / subtype / poll interval / linked remotes). This module is the single home for that shared logic so a change lands in one place instead of four — platform files call one inject_companion_sensor_ids() post-validator and one create_companion_sensors() to_code() helper. Platform-specific pieces — entity construction/registration, the cover's invert_position option, and the cover's favorite/vent companion buttons — deliberately stay in the platform files.
Definition in file platform_common.py.