Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
home_io_control.tuning Namespace Reference

Functions

 _id_key (param_key)
 _one_of_string (param_name, options, coerce_number=False)
 _hex_value (param_name, digits)
 _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_COLD_BROADCAST_REPLY_PREAMBLE = "cold_broadcast_reply_preamble"
str CONF_NORMAL_START_PREAMBLE = "normal_start_preamble"
str CONF_LBT_MAX_RETRIES = "lbt_max_retries"
str CONF_LBT_RSSI_THRESHOLD_DBM = "lbt_rssi_threshold_dbm"
str CONF_LOW_POWER_WAKE_BELIEF = "low_power_wake_belief"
str CONF_LOW_POWER_WAKE_PREAMBLE = "low_power_wake_preamble"
str CONF_EXCHANGE_START_RESPONSE_WAIT_MS = "exchange_start_response_wait_ms"
str CONF_EXCHANGE_EARLY_RESPONSE_WAIT_MS = "exchange_early_response_wait_ms"
str CONF_EXCHANGE_RESPONSE_WAIT_MS = "exchange_response_wait_ms"
str CONF_EXCHANGE_TOTAL_BUDGET_MS = "exchange_total_budget_ms"
str CONF_REMOTE_ACTIVITY_POLL_DELAY_MS = "remote_activity_poll_delay_ms"
str CONF_REMOTE_ACTIVITY_CATCHUP_POLL_MS = "remote_activity_catchup_poll_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_ACK_CAPABLE = "pairing_discovery_ack_capable"
str CONF_PAIRING_DISCOVERY_PREAMBLE = "pairing_discovery_preamble"
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"
str CONF_SCAN_POWER_CLASSES = "scan_power_classes"
str CONF_PAIRING_DISCOVER_CONFIRM = "pairing_discover_confirm"
str CONF_PAIRING_DISCOVERY_LISTEN_CHANNELS = "pairing_discovery_listen_channels"
str CONF_PAIRING_KEY_INIT_DELAY_MS = "pairing_key_init_delay_ms"
str CONF_PAIRING_KEY_TRANSFER = "pairing_key_transfer"
str CONF_KEY_EXTRACTION_TYPE_WORD = "key_extraction_type_word"
str CONF_KEY_EXTRACTION_MULTI_INFO = "key_extraction_multi_info"
 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)
 ScanPowerClasses = home_io_control_ns.enum("ScanPowerClasses", is_class=True)
 DiscoverConfirmMode = home_io_control_ns.enum("DiscoverConfirmMode", is_class=True)
 DiscoveryListenChannels = home_io_control_ns.enum("DiscoveryListenChannels", is_class=True)
 KeyTransferMode = home_io_control_ns.enum("KeyTransferMode", 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
list PAIRING_DISCOVERY_PAYLOAD_OPTIONS = ["none", "0x00"]
dict SCAN_POWER_CLASSES_OPTIONS
dict DISCOVER_CONFIRM_MODE_OPTIONS
dict DISCOVERY_LISTEN_CHANNELS_OPTIONS
dict KEY_TRANSFER_MODE_OPTIONS
dict UI_NAMES
dict _NUMBER_PARAMS
tuple _BOOL_PARAMS = (CONF_PAIRING_DISCOVERY_LOW_POWER, CONF_PAIRING_DISCOVERY_ACK_CAPABLE, CONF_LOW_POWER_WAKE_BELIEF)
list _BOOL_SELECT_OPTIONS = ["Off", "On"]
dict _SELECT_OPTIONS
 _validate_bandwidth
 _validate_sx1276_bandwidth
 _validate_lr1121_bandwidth
 _validate_discovery_command
 _validate_discovery_destination
 _validate_discovery_payload
 _validate_scan_power_classes
 _validate_discover_confirm_mode
 _validate_discovery_listen_channels
 _validate_key_transfer_mode
dict _HEX_PARAMS
 TUNING_SCHEMA
 TUNING_CONFIG_SCHEMA = cv.All(TUNING_SCHEMA, _inject_tuning_companion_ids)

Function Documentation

◆ _apply_tuning_config()

_apply_tuning_config ( config,
var )
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 555 of file tuning.py.

Here is the call graph for this function:

◆ _assign()

_assign ( struct,
field,
value )
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).

Definition at line 545 of file tuning.py.

◆ _cpp_bool()

_cpp_bool ( value)
protected
Format a Python bool as a C++ boolean literal.

Definition at line 540 of file tuning.py.

◆ _create_number()

_create_number ( config,
var,
key,
min_value,
max_value,
step,
unit = "" )
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 693 of file tuning.py.

Here is the call graph for this function:

◆ _create_select()

_create_select ( config,
var,
key,
options )
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 724 of file tuning.py.

Here is the call graph for this function:

◆ _create_tuning_entities()

_create_tuning_entities ( config,
var )
protected
Generate number/select entities for the tuning parameters when enabled.

Definition at line 677 of file tuning.py.

Here is the call graph for this function:

◆ _hex_value()

_hex_value ( param_name,
digits )
protected
Build a validator for a protocol byte or word: an int (YAML ``0xDC``) or a hex string.

Accepts ``0xDC``, ``"0xDC"`` and ``"DC"`` (spaces allowed, so ``"01 80"`` copied from a frame
dump works), and rejects anything wider than `digits` hex digits.

Definition at line 441 of file tuning.py.

◆ _id_key()

_id_key ( param_key)
protected
Config-dict key under which a parameter's injected companion entity ID is stored.

Definition at line 216 of file tuning.py.

◆ _inject_tuning_companion_ids()

_inject_tuning_companion_ids ( config)
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 513 of file tuning.py.

Here is the call graph for this function:

◆ _one_of_string()

_one_of_string ( param_name,
options,
coerce_number = False )
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.

Definition at line 382 of file tuning.py.

◆ _parse_destination_to_bytes()

_parse_destination_to_bytes ( value)
protected
Convert an explicit destination string like '0x00003B' to a list of 3 byte values.

Definition at line 466 of file tuning.py.

◆ _parse_payload()

_parse_payload ( value)
protected
Convert a payload option string like '0x00' to its numeric byte value.

Definition at line 472 of file tuning.py.

◆ to_code()

to_code ( config,
var )
Generate code for the tuning block.

Definition at line 747 of file tuning.py.

Here is the call graph for this function:

Variable Documentation

◆ _BOOL_PARAMS

tuple home_io_control.tuning._BOOL_PARAMS = (CONF_PAIRING_DISCOVERY_LOW_POWER, CONF_PAIRING_DISCOVERY_ACK_CAPABLE, CONF_LOW_POWER_WAKE_BELIEF)
protected

Definition at line 357 of file tuning.py.

◆ _BOOL_SELECT_OPTIONS

list home_io_control.tuning._BOOL_SELECT_OPTIONS = ["Off", "On"]
protected

Definition at line 358 of file tuning.py.

◆ _COMPANION_ID_BASE

str home_io_control.tuning._COMPANION_ID_BASE = "home_io_control"
protected

Definition at line 22 of file tuning.py.

◆ _HEX_PARAMS

dict home_io_control.tuning._HEX_PARAMS
protected
Initial value:
= {
CONF_KEY_EXTRACTION_TYPE_WORD: 4,
CONF_KEY_EXTRACTION_MULTI_INFO: 2,
}

Definition at line 435 of file tuning.py.

◆ _NUMBER_PARAMS

dict home_io_control.tuning._NUMBER_PARAMS
protected

Definition at line 268 of file tuning.py.

◆ _SELECT_OPTIONS

dict home_io_control.tuning._SELECT_OPTIONS
protected
Initial value:
= {
CONF_PAIRING_DISCOVERY_COMMANDS: DISCOVERY_COMMAND_PRESETS,
CONF_PAIRING_DISCOVERY_DESTINATION: DISCOVERY_DESTINATION_OPTIONS,
CONF_PAIRING_DISCOVERY_PAYLOAD: PAIRING_DISCOVERY_PAYLOAD_OPTIONS,
# check-tuning-sync.py's AST scan only understands plain `CONF_*: value` entries in this dict
# (no `**` unpacking), so the boolean rows stay written out individually here even though
# _BOOL_PARAMS drives the schema and to_code() loops below.
CONF_PAIRING_DISCOVERY_LOW_POWER: _BOOL_SELECT_OPTIONS,
CONF_PAIRING_DISCOVERY_ACK_CAPABLE: _BOOL_SELECT_OPTIONS,
CONF_SX1262_RX_BANDWIDTH: list(SX1262_BANDWIDTH_OPTIONS),
CONF_SX1276_RX_BANDWIDTH: list(SX1276_BANDWIDTH_OPTIONS),
CONF_LR1121_RX_BANDWIDTH: list(LR1121_BANDWIDTH_OPTIONS),
CONF_LOW_POWER_WAKE_BELIEF: _BOOL_SELECT_OPTIONS,
CONF_SCAN_POWER_CLASSES: list(SCAN_POWER_CLASSES_OPTIONS),
CONF_PAIRING_DISCOVER_CONFIRM: list(DISCOVER_CONFIRM_MODE_OPTIONS),
CONF_PAIRING_DISCOVERY_LISTEN_CHANNELS: list(DISCOVERY_LISTEN_CHANNELS_OPTIONS),
CONF_PAIRING_KEY_TRANSFER: list(KEY_TRANSFER_MODE_OPTIONS),
}

Definition at line 362 of file tuning.py.

◆ _validate_bandwidth

home_io_control.tuning._validate_bandwidth
protected
Initial value:
= _one_of_string(
CONF_SX1262_RX_BANDWIDTH, SX1262_BANDWIDTH_OPTIONS, coerce_number=True
)

Definition at line 402 of file tuning.py.

◆ _validate_discover_confirm_mode

home_io_control.tuning._validate_discover_confirm_mode
protected
Initial value:
= _one_of_string(
CONF_PAIRING_DISCOVER_CONFIRM, DISCOVER_CONFIRM_MODE_OPTIONS
)

Definition at line 423 of file tuning.py.

◆ _validate_discovery_command

home_io_control.tuning._validate_discovery_command
protected
Initial value:
= _one_of_string(
f"{CONF_PAIRING_DISCOVERY_COMMANDS} entries", DISCOVERY_COMMAND_OPTIONS
)

Definition at line 411 of file tuning.py.

◆ _validate_discovery_destination

home_io_control.tuning._validate_discovery_destination
protected
Initial value:
= _one_of_string(
CONF_PAIRING_DISCOVERY_DESTINATION, DISCOVERY_DESTINATION_OPTIONS
)

Definition at line 414 of file tuning.py.

◆ _validate_discovery_listen_channels

home_io_control.tuning._validate_discovery_listen_channels
protected
Initial value:
= _one_of_string(
CONF_PAIRING_DISCOVERY_LISTEN_CHANNELS, DISCOVERY_LISTEN_CHANNELS_OPTIONS
)

Definition at line 426 of file tuning.py.

◆ _validate_discovery_payload

home_io_control.tuning._validate_discovery_payload
protected
Initial value:
= _one_of_string(
CONF_PAIRING_DISCOVERY_PAYLOAD, PAIRING_DISCOVERY_PAYLOAD_OPTIONS
)

Definition at line 417 of file tuning.py.

◆ _validate_key_transfer_mode

home_io_control.tuning._validate_key_transfer_mode
protected
Initial value:
= _one_of_string(
CONF_PAIRING_KEY_TRANSFER, KEY_TRANSFER_MODE_OPTIONS
)

Definition at line 429 of file tuning.py.

◆ _validate_lr1121_bandwidth

home_io_control.tuning._validate_lr1121_bandwidth
protected
Initial value:
= _one_of_string(
CONF_LR1121_RX_BANDWIDTH, LR1121_BANDWIDTH_OPTIONS, coerce_number=True
)

Definition at line 408 of file tuning.py.

◆ _validate_scan_power_classes

home_io_control.tuning._validate_scan_power_classes
protected
Initial value:
= _one_of_string(
CONF_SCAN_POWER_CLASSES, SCAN_POWER_CLASSES_OPTIONS
)

Definition at line 420 of file tuning.py.

◆ _validate_sx1276_bandwidth

home_io_control.tuning._validate_sx1276_bandwidth
protected
Initial value:
= _one_of_string(
CONF_SX1276_RX_BANDWIDTH, SX1276_BANDWIDTH_OPTIONS, coerce_number=True
)

Definition at line 405 of file tuning.py.

◆ CONF_COLD_BROADCAST_REPLY_PREAMBLE

str home_io_control.tuning.CONF_COLD_BROADCAST_REPLY_PREAMBLE = "cold_broadcast_reply_preamble"

Definition at line 36 of file tuning.py.

◆ CONF_EXCHANGE_EARLY_RESPONSE_WAIT_MS

str home_io_control.tuning.CONF_EXCHANGE_EARLY_RESPONSE_WAIT_MS = "exchange_early_response_wait_ms"

Definition at line 43 of file tuning.py.

◆ CONF_EXCHANGE_RESPONSE_WAIT_MS

str home_io_control.tuning.CONF_EXCHANGE_RESPONSE_WAIT_MS = "exchange_response_wait_ms"

Definition at line 44 of file tuning.py.

◆ CONF_EXCHANGE_START_RESPONSE_WAIT_MS

str home_io_control.tuning.CONF_EXCHANGE_START_RESPONSE_WAIT_MS = "exchange_start_response_wait_ms"

Definition at line 42 of file tuning.py.

◆ CONF_EXCHANGE_TOTAL_BUDGET_MS

str home_io_control.tuning.CONF_EXCHANGE_TOTAL_BUDGET_MS = "exchange_total_budget_ms"

Definition at line 45 of file tuning.py.

◆ CONF_KEY_EXTRACTION_MULTI_INFO

str home_io_control.tuning.CONF_KEY_EXTRACTION_MULTI_INFO = "key_extraction_multi_info"

Definition at line 67 of file tuning.py.

◆ CONF_KEY_EXTRACTION_TYPE_WORD

str home_io_control.tuning.CONF_KEY_EXTRACTION_TYPE_WORD = "key_extraction_type_word"

Definition at line 66 of file tuning.py.

◆ CONF_LBT_MAX_RETRIES

str home_io_control.tuning.CONF_LBT_MAX_RETRIES = "lbt_max_retries"

Definition at line 38 of file tuning.py.

◆ CONF_LBT_RSSI_THRESHOLD_DBM

str home_io_control.tuning.CONF_LBT_RSSI_THRESHOLD_DBM = "lbt_rssi_threshold_dbm"

Definition at line 39 of file tuning.py.

◆ CONF_LOW_POWER_WAKE_BELIEF

str home_io_control.tuning.CONF_LOW_POWER_WAKE_BELIEF = "low_power_wake_belief"

Definition at line 40 of file tuning.py.

◆ CONF_LOW_POWER_WAKE_PREAMBLE

str home_io_control.tuning.CONF_LOW_POWER_WAKE_PREAMBLE = "low_power_wake_preamble"

Definition at line 41 of file tuning.py.

◆ CONF_LR1121_DISCOVERY_HOP_SLICE_MS

str home_io_control.tuning.CONF_LR1121_DISCOVERY_HOP_SLICE_MS = "lr1121_discovery_hop_slice_ms"

Definition at line 35 of file tuning.py.

◆ CONF_LR1121_POST_TX_SETTLE_US

str home_io_control.tuning.CONF_LR1121_POST_TX_SETTLE_US = "lr1121_post_tx_settle_us"

Definition at line 34 of file tuning.py.

◆ CONF_LR1121_RESPONSE_PREAMBLE

str home_io_control.tuning.CONF_LR1121_RESPONSE_PREAMBLE = "lr1121_response_preamble"

Definition at line 33 of file tuning.py.

◆ CONF_LR1121_RX_BANDWIDTH

str home_io_control.tuning.CONF_LR1121_RX_BANDWIDTH = "lr1121_rx_bandwidth"

Definition at line 32 of file tuning.py.

◆ CONF_NORMAL_START_PREAMBLE

str home_io_control.tuning.CONF_NORMAL_START_PREAMBLE = "normal_start_preamble"

Definition at line 37 of file tuning.py.

◆ CONF_PAIRING_DISCOVER_CONFIRM

str home_io_control.tuning.CONF_PAIRING_DISCOVER_CONFIRM = "pairing_discover_confirm"

Definition at line 62 of file tuning.py.

◆ CONF_PAIRING_DISCOVERY_ACK_CAPABLE

str home_io_control.tuning.CONF_PAIRING_DISCOVERY_ACK_CAPABLE = "pairing_discovery_ack_capable"

Definition at line 56 of file tuning.py.

◆ CONF_PAIRING_DISCOVERY_COMMANDS

str home_io_control.tuning.CONF_PAIRING_DISCOVERY_COMMANDS = "pairing_discovery_commands"

Definition at line 52 of file tuning.py.

◆ CONF_PAIRING_DISCOVERY_DESTINATION

str home_io_control.tuning.CONF_PAIRING_DISCOVERY_DESTINATION = "pairing_discovery_destination"

Definition at line 53 of file tuning.py.

◆ CONF_PAIRING_DISCOVERY_INITIAL_DWELL_MS

str home_io_control.tuning.CONF_PAIRING_DISCOVERY_INITIAL_DWELL_MS = "pairing_discovery_initial_dwell_ms"

Definition at line 59 of file tuning.py.

◆ CONF_PAIRING_DISCOVERY_LISTEN_CHANNELS

str home_io_control.tuning.CONF_PAIRING_DISCOVERY_LISTEN_CHANNELS = "pairing_discovery_listen_channels"

Definition at line 63 of file tuning.py.

◆ CONF_PAIRING_DISCOVERY_LOW_POWER

str home_io_control.tuning.CONF_PAIRING_DISCOVERY_LOW_POWER = "pairing_discovery_low_power"

Definition at line 55 of file tuning.py.

◆ CONF_PAIRING_DISCOVERY_PAYLOAD

str home_io_control.tuning.CONF_PAIRING_DISCOVERY_PAYLOAD = "pairing_discovery_payload"

Definition at line 54 of file tuning.py.

◆ CONF_PAIRING_DISCOVERY_PREAMBLE

str home_io_control.tuning.CONF_PAIRING_DISCOVERY_PREAMBLE = "pairing_discovery_preamble"

Definition at line 57 of file tuning.py.

◆ CONF_PAIRING_DISCOVERY_WAIT_MS

str home_io_control.tuning.CONF_PAIRING_DISCOVERY_WAIT_MS = "pairing_discovery_wait_ms"

Definition at line 58 of file tuning.py.

◆ CONF_PAIRING_KEY_EXCHANGE_RETRIES

str home_io_control.tuning.CONF_PAIRING_KEY_EXCHANGE_RETRIES = "pairing_key_exchange_retries"

Definition at line 60 of file tuning.py.

◆ CONF_PAIRING_KEY_INIT_DELAY_MS

str home_io_control.tuning.CONF_PAIRING_KEY_INIT_DELAY_MS = "pairing_key_init_delay_ms"

Definition at line 64 of file tuning.py.

◆ CONF_PAIRING_KEY_TRANSFER

str home_io_control.tuning.CONF_PAIRING_KEY_TRANSFER = "pairing_key_transfer"

Definition at line 65 of file tuning.py.

◆ CONF_REMOTE_ACTIVITY_CATCHUP_POLL_MS

str home_io_control.tuning.CONF_REMOTE_ACTIVITY_CATCHUP_POLL_MS = "remote_activity_catchup_poll_ms"

Definition at line 49 of file tuning.py.

◆ CONF_REMOTE_ACTIVITY_POLL_DELAY_MS

str home_io_control.tuning.CONF_REMOTE_ACTIVITY_POLL_DELAY_MS = "remote_activity_poll_delay_ms"

Definition at line 48 of file tuning.py.

◆ CONF_SCAN_POWER_CLASSES

str home_io_control.tuning.CONF_SCAN_POWER_CLASSES = "scan_power_classes"

Definition at line 61 of file tuning.py.

◆ CONF_SX1262_DISCOVERY_HOP_SLICE_MS

str home_io_control.tuning.CONF_SX1262_DISCOVERY_HOP_SLICE_MS = "sx1262_discovery_hop_slice_ms"

Definition at line 31 of file tuning.py.

◆ CONF_SX1262_POST_TX_SETTLE_US

str home_io_control.tuning.CONF_SX1262_POST_TX_SETTLE_US = "sx1262_post_tx_settle_us"

Definition at line 27 of file tuning.py.

◆ CONF_SX1262_RESPONSE_PREAMBLE

str home_io_control.tuning.CONF_SX1262_RESPONSE_PREAMBLE = "sx1262_response_preamble"

Definition at line 26 of file tuning.py.

◆ CONF_SX1262_RX_BANDWIDTH

str home_io_control.tuning.CONF_SX1262_RX_BANDWIDTH = "sx1262_rx_bandwidth"

Definition at line 25 of file tuning.py.

◆ CONF_SX1276_DISCOVERY_HOP_SLICE_MS

str home_io_control.tuning.CONF_SX1276_DISCOVERY_HOP_SLICE_MS = "sx1276_discovery_hop_slice_ms"

Definition at line 30 of file tuning.py.

◆ CONF_SX1276_RESPONSE_PREAMBLE

str home_io_control.tuning.CONF_SX1276_RESPONSE_PREAMBLE = "sx1276_response_preamble"

Definition at line 29 of file tuning.py.

◆ CONF_SX1276_RX_BANDWIDTH

str home_io_control.tuning.CONF_SX1276_RX_BANDWIDTH = "sx1276_rx_bandwidth"

Definition at line 28 of file tuning.py.

◆ CONF_TUNING

str home_io_control.tuning.CONF_TUNING = "tuning"

Definition at line 18 of file tuning.py.

◆ CONF_UI_CONTROLS

str home_io_control.tuning.CONF_UI_CONTROLS = "ui_controls"

Definition at line 19 of file tuning.py.

◆ DISCOVER_CONFIRM_MODE_OPTIONS

dict home_io_control.tuning.DISCOVER_CONFIRM_MODE_OPTIONS
Initial value:
= {
"skip": DiscoverConfirmMode.SKIP,
"send": DiscoverConfirmMode.SEND,
"send_with_ack": DiscoverConfirmMode.SEND_WITH_ACK,
}

Definition at line 190 of file tuning.py.

◆ DiscoverConfirmMode

home_io_control.tuning.DiscoverConfirmMode = home_io_control_ns.enum("DiscoverConfirmMode", is_class=True)

Definition at line 86 of file tuning.py.

◆ DISCOVERY_COMMAND_OPTIONS

dict home_io_control.tuning.DISCOVERY_COMMAND_OPTIONS
Initial value:
= {
"0x28": DiscoveryCommand.DISCOVER,
"0x2E": DiscoveryCommand.DISCOVER_ALT,
}

Definition at line 127 of file tuning.py.

◆ DISCOVERY_COMMAND_PRESETS

list home_io_control.tuning.DISCOVERY_COMMAND_PRESETS
Initial value:
= [
"0x28", # default 2W discovery
"0x2E", # alternate discovery — kept for completeness/experimentation, but broadcast 0x2E has
# never drawn a response from any device this project has real evidence for; see the
# CMD_DISCOVER_ALT_REQ doc comment in proto_constants.h. Not a recommended fix.
"0x28,0x2E", # both broadcasts
]

Definition at line 140 of file tuning.py.

◆ DISCOVERY_DESTINATION_OPTIONS

list home_io_control.tuning.DISCOVERY_DESTINATION_OPTIONS
Initial value:
= [
"auto",
"0x00003B",
"0x00003F",
"0x0001BB",
"0x0001BF",
"0x00FFFB",
]

Definition at line 163 of file tuning.py.

◆ DISCOVERY_LISTEN_CHANNELS_OPTIONS

dict home_io_control.tuning.DISCOVERY_LISTEN_CHANNELS_OPTIONS
Initial value:
= {
"skip_request": DiscoveryListenChannels.SKIP_REQUEST,
"all": DiscoveryListenChannels.ALL,
}

Definition at line 200 of file tuning.py.

◆ DiscoveryCommand

home_io_control.tuning.DiscoveryCommand = home_io_control_ns.enum("DiscoveryCommand", is_class=True)

Definition at line 84 of file tuning.py.

◆ DiscoveryListenChannels

home_io_control.tuning.DiscoveryListenChannels = home_io_control_ns.enum("DiscoveryListenChannels", is_class=True)

Definition at line 87 of file tuning.py.

◆ home_io_control_ns

home_io_control.tuning.home_io_control_ns = cg.esphome_ns.namespace("home_io_control")

Definition at line 16 of file tuning.py.

◆ IOHomeTuningNumber

home_io_control.tuning.IOHomeTuningNumber
Initial value:
= home_io_control_ns.class_(
"IOHomeTuningNumber", number.Number, cg.Component
)

Definition at line 71 of file tuning.py.

◆ IOHomeTuningSelect

home_io_control.tuning.IOHomeTuningSelect
Initial value:
= home_io_control_ns.class_(
"IOHomeTuningSelect", select.Select, cg.Component
)

Definition at line 74 of file tuning.py.

◆ KEY_TRANSFER_MODE_OPTIONS

dict home_io_control.tuning.KEY_TRANSFER_MODE_OPTIONS
Initial value:
= {
"auto": KeyTransferMode.AUTO,
"push": KeyTransferMode.PUSH,
"pull": KeyTransferMode.PULL,
}

Definition at line 209 of file tuning.py.

◆ KeyTransferMode

home_io_control.tuning.KeyTransferMode = home_io_control_ns.enum("KeyTransferMode", is_class=True)

Definition at line 88 of file tuning.py.

◆ LR1121_BANDWIDTH_OPTIONS

dict home_io_control.tuning.LR1121_BANDWIDTH_OPTIONS
Initial value:
= {
"39.0": LR1121RxBandwidth.BW_39_0_KHZ,
"46.9": LR1121RxBandwidth.BW_46_9_KHZ,
"58.6": LR1121RxBandwidth.BW_58_6_KHZ,
"78.2": LR1121RxBandwidth.BW_78_2_KHZ,
"117.3": LR1121RxBandwidth.BW_117_3_KHZ,
"156.2": LR1121RxBandwidth.BW_156_2_KHZ,
"187.2": LR1121RxBandwidth.BW_187_2_KHZ,
}

Definition at line 117 of file tuning.py.

◆ LR1121RxBandwidth

home_io_control.tuning.LR1121RxBandwidth = home_io_control_ns.enum("LR1121RxBandwidth", is_class=True)

Definition at line 83 of file tuning.py.

◆ PAIRING_DISCOVERY_PAYLOAD_OPTIONS

list home_io_control.tuning.PAIRING_DISCOVERY_PAYLOAD_OPTIONS = ["none", "0x00"]

Definition at line 172 of file tuning.py.

◆ SCAN_POWER_CLASSES_OPTIONS

dict home_io_control.tuning.SCAN_POWER_CLASSES_OPTIONS
Initial value:
= {
"both": ScanPowerClasses.BOTH,
"always_alive": ScanPowerClasses.ALWAYS_ALIVE,
"low_power": ScanPowerClasses.LOW_POWER,
}

Definition at line 179 of file tuning.py.

◆ ScanPowerClasses

home_io_control.tuning.ScanPowerClasses = home_io_control_ns.enum("ScanPowerClasses", is_class=True)

Definition at line 85 of file tuning.py.

◆ SX1262_BANDWIDTH_OPTIONS

dict home_io_control.tuning.SX1262_BANDWIDTH_OPTIONS
Initial value:
= {
"39.0": SX1262RxBandwidth.BW_39_0_KHZ,
"46.9": SX1262RxBandwidth.BW_46_9_KHZ,
"58.6": SX1262RxBandwidth.BW_58_6_KHZ,
"78.2": SX1262RxBandwidth.BW_78_2_KHZ,
"117.3": SX1262RxBandwidth.BW_117_3_KHZ,
"156.2": SX1262RxBandwidth.BW_156_2_KHZ,
"187.2": SX1262RxBandwidth.BW_187_2_KHZ,
}

Definition at line 92 of file tuning.py.

◆ SX1262RxBandwidth

home_io_control.tuning.SX1262RxBandwidth = home_io_control_ns.enum("SX1262RxBandwidth", is_class=True)

Definition at line 81 of file tuning.py.

◆ SX1276_BANDWIDTH_OPTIONS

dict home_io_control.tuning.SX1276_BANDWIDTH_OPTIONS
Initial value:
= {
"20.8": SX1276RxBandwidth.BW_20_8_KHZ,
"41.7": SX1276RxBandwidth.BW_41_7_KHZ,
"62.5": SX1276RxBandwidth.BW_62_5_KHZ,
"83.3": SX1276RxBandwidth.BW_83_3_KHZ,
"125.0": SX1276RxBandwidth.BW_125_0_KHZ,
}

Definition at line 102 of file tuning.py.

◆ SX1276RxBandwidth

home_io_control.tuning.SX1276RxBandwidth = home_io_control_ns.enum("SX1276RxBandwidth", is_class=True)

Definition at line 82 of file tuning.py.

◆ TUNING_CONFIG_SCHEMA

home_io_control.tuning.TUNING_CONFIG_SCHEMA = cv.All(TUNING_SCHEMA, _inject_tuning_companion_ids)

Definition at line 537 of file tuning.py.

◆ TUNING_SCHEMA

home_io_control.tuning.TUNING_SCHEMA
Initial value:
= cv.Schema(
{
cv.Optional(CONF_UI_CONTROLS, default=False): cv.boolean,
cv.Optional(CONF_SX1262_RX_BANDWIDTH): _validate_bandwidth,
cv.Optional(CONF_SX1276_RX_BANDWIDTH): _validate_sx1276_bandwidth,
cv.Optional(CONF_LR1121_RX_BANDWIDTH): _validate_lr1121_bandwidth,
cv.Optional(CONF_PAIRING_DISCOVERY_COMMANDS): cv.All(
cv.ensure_list(_validate_discovery_command),
cv.Length(min=1),
),
cv.Optional(CONF_PAIRING_DISCOVERY_DESTINATION): _validate_discovery_destination,
cv.Optional(CONF_PAIRING_DISCOVERY_PAYLOAD): _validate_discovery_payload,
cv.Optional(CONF_SCAN_POWER_CLASSES): _validate_scan_power_classes,
cv.Optional(CONF_PAIRING_DISCOVER_CONFIRM): _validate_discover_confirm_mode,
cv.Optional(
CONF_PAIRING_DISCOVERY_LISTEN_CHANNELS
): _validate_discovery_listen_channels,
cv.Optional(CONF_PAIRING_KEY_TRANSFER): _validate_key_transfer_mode,
**{cv.Optional(key): cv.boolean for key in _BOOL_PARAMS},
# Numeric parameters share their range with the number-entity bounds via _NUMBER_PARAMS.
**{
cv.Optional(key): cv.int_range(min=lo, max=hi)
for key, (lo, hi, _step, _unit) in _NUMBER_PARAMS.items()
if key not in _HEX_PARAMS
},
**{cv.Optional(key): _hex_value(key, digits) for key, digits in _HEX_PARAMS.items()},
}
)

Definition at line 483 of file tuning.py.

◆ TuningConfig

home_io_control.tuning.TuningConfig = home_io_control_ns.class_("TuningConfig")

Definition at line 70 of file tuning.py.

◆ UI_NAMES

dict home_io_control.tuning.UI_NAMES

Definition at line 224 of file tuning.py.