|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Functions | |
| _id_key (param_key) | |
| _one_of_string (param_name, options, coerce_number=False) | |
| _parse_destination_to_bytes (value) | |
| _parse_payload (value) | |
| _inject_tuning_companion_ids (config) | |
| _cpp_bool (value) | |
| _assign (struct, field, value) | |
| _apply_tuning_config (config, var) | |
| _create_tuning_entities (config, var) | |
| _create_number (config, var, key, min_value, max_value, step, unit="") | |
| _create_select (config, var, key, options) | |
| to_code (config, var) | |
Variables | |
| home_io_control_ns = cg.esphome_ns.namespace("home_io_control") | |
| str | CONF_TUNING = "tuning" |
| str | CONF_UI_CONTROLS = "ui_controls" |
| str | _COMPANION_ID_BASE = "home_io_control" |
| str | CONF_SX1262_RX_BANDWIDTH = "sx1262_rx_bandwidth" |
| str | CONF_SX1262_RESPONSE_PREAMBLE = "sx1262_response_preamble" |
| str | CONF_SX1262_POST_TX_SETTLE_US = "sx1262_post_tx_settle_us" |
| str | CONF_SX1276_RX_BANDWIDTH = "sx1276_rx_bandwidth" |
| str | CONF_SX1276_RESPONSE_PREAMBLE = "sx1276_response_preamble" |
| str | CONF_SX1276_DISCOVERY_HOP_SLICE_MS = "sx1276_discovery_hop_slice_ms" |
| str | CONF_SX1262_DISCOVERY_HOP_SLICE_MS = "sx1262_discovery_hop_slice_ms" |
| str | CONF_LR1121_RX_BANDWIDTH = "lr1121_rx_bandwidth" |
| str | CONF_LR1121_RESPONSE_PREAMBLE = "lr1121_response_preamble" |
| str | CONF_LR1121_POST_TX_SETTLE_US = "lr1121_post_tx_settle_us" |
| str | CONF_LR1121_DISCOVERY_HOP_SLICE_MS = "lr1121_discovery_hop_slice_ms" |
| str | CONF_LBT_MAX_RETRIES = "lbt_max_retries" |
| str | CONF_LBT_RSSI_THRESHOLD_DBM = "lbt_rssi_threshold_dbm" |
| str | CONF_EXCHANGE_START_RESPONSE_WAIT_MS = "exchange_start_response_wait_ms" |
| str | CONF_EXCHANGE_RESPONSE_WAIT_MS = "exchange_response_wait_ms" |
| str | CONF_PAIRING_DISCOVERY_COMMANDS = "pairing_discovery_commands" |
| str | CONF_PAIRING_DISCOVERY_DESTINATION = "pairing_discovery_destination" |
| str | CONF_PAIRING_DISCOVERY_PAYLOAD = "pairing_discovery_payload" |
| str | CONF_PAIRING_DISCOVERY_LOW_POWER = "pairing_discovery_low_power" |
| str | CONF_PAIRING_DISCOVERY_WAIT_MS = "pairing_discovery_wait_ms" |
| str | CONF_PAIRING_DISCOVERY_INITIAL_DWELL_MS = "pairing_discovery_initial_dwell_ms" |
| str | CONF_PAIRING_KEY_EXCHANGE_RETRIES = "pairing_key_exchange_retries" |
| TuningConfig = home_io_control_ns.class_("TuningConfig") | |
| IOHomeTuningNumber | |
| IOHomeTuningSelect | |
| SX1262RxBandwidth = home_io_control_ns.enum("SX1262RxBandwidth", is_class=True) | |
| SX1276RxBandwidth = home_io_control_ns.enum("SX1276RxBandwidth", is_class=True) | |
| LR1121RxBandwidth = home_io_control_ns.enum("LR1121RxBandwidth", is_class=True) | |
| DiscoveryCommand = home_io_control_ns.enum("DiscoveryCommand", is_class=True) | |
| dict | SX1262_BANDWIDTH_OPTIONS |
| dict | SX1276_BANDWIDTH_OPTIONS |
| dict | LR1121_BANDWIDTH_OPTIONS |
| dict | DISCOVERY_COMMAND_OPTIONS |
| list | DISCOVERY_COMMAND_PRESETS |
| list | DISCOVERY_DESTINATION_OPTIONS = ["auto", "0x00003B", "0x00003F"] |
| list | PAIRING_DISCOVERY_PAYLOAD_OPTIONS = ["none", "0x00"] |
| dict | UI_NAMES |
| dict | _NUMBER_PARAMS |
| dict | _SELECT_OPTIONS |
| _validate_bandwidth | |
| _validate_sx1276_bandwidth | |
| _validate_lr1121_bandwidth | |
| _validate_discovery_command | |
| _validate_discovery_destination | |
| _validate_discovery_payload | |
| TUNING_SCHEMA | |
| TUNING_CONFIG_SCHEMA = cv.All(TUNING_SCHEMA, _inject_tuning_companion_ids) | |
|
protected |
Generate C++ code that builds a TuningConfig from the validated YAML. Only keys the user actually provided are emitted; every omitted key keeps the default baked into the C++ TuningConfig struct (sourced from proto_frame.h), so the defaults are never restated here.
Definition at line 318 of file tuning.py.
|
protected |
Emit a `struct.field = value;` C++ assignment statement at codegen time. ESPHome's MockObj does not support Python attribute assignment, so struct fields are populated with raw assignment statements. `value` must already be valid C++ (an int, or a string such as an enum value or brace-init list).
|
protected |
|
protected |
Create a single IOHomeTuningNumber entity.
The bare {id, name} dict is normalized through number_schema()+COMPONENT_SCHEMA so it
carries the entity/component defaults (disabled_by_default, setup_priority, ...) that
register_number()/register_component() require.
Definition at line 416 of file tuning.py.
|
protected |
Create a single IOHomeTuningSelect entity.
The bare {id, name} dict is normalized through select_schema()+COMPONENT_SCHEMA so it
carries the entity/component defaults that register_select()/register_component() require.
Definition at line 447 of file tuning.py.
|
protected |
|
protected |
|
protected |
Declare companion entity IDs for tuning UI controls. ESPHome 2026.x sizes the runtime component vector from the number of IDs declared during validation. If UI entities were created only in to_code(), they could be silently dropped. This post-validator injects declared IDs before the vector is sized.
Definition at line 276 of file tuning.py.
|
protected |
Build a validator that requires a string value present in `options`. Works for both list and dict `options` (dict membership tests the keys), so a single factory replaces a hand-written validator per option set while keeping a per-parameter error message. With `coerce_number`, a numeric YAML value (e.g. ``117.3``) is accepted and normalized to its string form, so bare-number options do not force the user to quote them.
|
protected |
|
protected |
| home_io_control.tuning.to_code | ( | config, | |
| var ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| str home_io_control.tuning.CONF_EXCHANGE_RESPONSE_WAIT_MS = "exchange_response_wait_ms" |
| str home_io_control.tuning.CONF_EXCHANGE_START_RESPONSE_WAIT_MS = "exchange_start_response_wait_ms" |
| str home_io_control.tuning.CONF_LBT_MAX_RETRIES = "lbt_max_retries" |
| str home_io_control.tuning.CONF_LBT_RSSI_THRESHOLD_DBM = "lbt_rssi_threshold_dbm" |
| str home_io_control.tuning.CONF_LR1121_DISCOVERY_HOP_SLICE_MS = "lr1121_discovery_hop_slice_ms" |
| str home_io_control.tuning.CONF_LR1121_POST_TX_SETTLE_US = "lr1121_post_tx_settle_us" |
| str home_io_control.tuning.CONF_LR1121_RESPONSE_PREAMBLE = "lr1121_response_preamble" |
| str home_io_control.tuning.CONF_LR1121_RX_BANDWIDTH = "lr1121_rx_bandwidth" |
| str home_io_control.tuning.CONF_PAIRING_DISCOVERY_COMMANDS = "pairing_discovery_commands" |
| str home_io_control.tuning.CONF_PAIRING_DISCOVERY_DESTINATION = "pairing_discovery_destination" |
| str home_io_control.tuning.CONF_PAIRING_DISCOVERY_INITIAL_DWELL_MS = "pairing_discovery_initial_dwell_ms" |
| str home_io_control.tuning.CONF_PAIRING_DISCOVERY_LOW_POWER = "pairing_discovery_low_power" |
| str home_io_control.tuning.CONF_PAIRING_DISCOVERY_PAYLOAD = "pairing_discovery_payload" |
| str home_io_control.tuning.CONF_PAIRING_DISCOVERY_WAIT_MS = "pairing_discovery_wait_ms" |
| str home_io_control.tuning.CONF_PAIRING_KEY_EXCHANGE_RETRIES = "pairing_key_exchange_retries" |
| str home_io_control.tuning.CONF_SX1262_DISCOVERY_HOP_SLICE_MS = "sx1262_discovery_hop_slice_ms" |
| str home_io_control.tuning.CONF_SX1262_POST_TX_SETTLE_US = "sx1262_post_tx_settle_us" |
| str home_io_control.tuning.CONF_SX1262_RESPONSE_PREAMBLE = "sx1262_response_preamble" |
| str home_io_control.tuning.CONF_SX1262_RX_BANDWIDTH = "sx1262_rx_bandwidth" |
| str home_io_control.tuning.CONF_SX1276_DISCOVERY_HOP_SLICE_MS = "sx1276_discovery_hop_slice_ms" |
| str home_io_control.tuning.CONF_SX1276_RESPONSE_PREAMBLE = "sx1276_response_preamble" |
| str home_io_control.tuning.CONF_SX1276_RX_BANDWIDTH = "sx1276_rx_bandwidth" |
| str home_io_control.tuning.CONF_UI_CONTROLS = "ui_controls" |
| dict home_io_control.tuning.DISCOVERY_COMMAND_OPTIONS |
| list home_io_control.tuning.DISCOVERY_COMMAND_PRESETS |
| list home_io_control.tuning.DISCOVERY_DESTINATION_OPTIONS = ["auto", "0x00003B", "0x00003F"] |
| home_io_control.tuning.DiscoveryCommand = home_io_control_ns.enum("DiscoveryCommand", is_class=True) |
| home_io_control.tuning.home_io_control_ns = cg.esphome_ns.namespace("home_io_control") |
| home_io_control.tuning.IOHomeTuningNumber |
| home_io_control.tuning.IOHomeTuningSelect |
| dict home_io_control.tuning.LR1121_BANDWIDTH_OPTIONS |
| home_io_control.tuning.LR1121RxBandwidth = home_io_control_ns.enum("LR1121RxBandwidth", is_class=True) |
| list home_io_control.tuning.PAIRING_DISCOVERY_PAYLOAD_OPTIONS = ["none", "0x00"] |
| dict home_io_control.tuning.SX1262_BANDWIDTH_OPTIONS |
| home_io_control.tuning.SX1262RxBandwidth = home_io_control_ns.enum("SX1262RxBandwidth", is_class=True) |
| dict home_io_control.tuning.SX1276_BANDWIDTH_OPTIONS |
| home_io_control.tuning.SX1276RxBandwidth = home_io_control_ns.enum("SX1276RxBandwidth", is_class=True) |
| home_io_control.tuning.TUNING_CONFIG_SCHEMA = cv.All(TUNING_SCHEMA, _inject_tuning_companion_ids) |
| home_io_control.tuning.TUNING_SCHEMA |
| home_io_control.tuning.TuningConfig = home_io_control_ns.class_("TuningConfig") |
| dict home_io_control.tuning.UI_NAMES |