Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches

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)

Variables

str home_io_control.platform_common.CONF_DEVICE_ID = "io_device_id"
str home_io_control.platform_common.CONF_LINKED_REMOTES = "linked_remotes"
str home_io_control.platform_common.CONF_DEVICE_TYPE = "io_device_type"
str home_io_control.platform_common.CONF_SUBTYPE = "io_subtype"
str home_io_control.platform_common.CONF_STATUS_POLL_INTERVAL = "status_poll_interval"
str home_io_control.platform_common.CONF_DEVICE_NAME_SENSOR_ID = "_device_name_sensor_id"
str home_io_control.platform_common.CONF_ACTIVE_ISSUE_SENSOR_ID = "_active_issue_sensor_id"
str home_io_control.platform_common.CONF_RSSI_SENSOR_ID = "_rssi_sensor_id"
str home_io_control.platform_common.CONF_LAST_CONTACT_SENSOR_ID = "_last_contact_sensor_id"
str home_io_control.platform_common.CONF_EXCHANGE_FAILURES_SENSOR_ID = "_exchange_failures_sensor_id"
 home_io_control.platform_common.IOHomeDeviceNameTextSensor
 home_io_control.platform_common.IOHomeActiveIssueTextSensor
 home_io_control.platform_common.IOHomeRssiSensor = home_io_control_ns.class_("IOHomeRssiSensor", sensor.Sensor, cg.Component)
 home_io_control.platform_common.IOHomeLastContactSensor
 home_io_control.platform_common.IOHomeExchangeFailuresSensor
tuple home_io_control.platform_common._COMPANION_SENSOR_IDS

Detailed Description

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.