Mixin holding the hub-device binding shared by all IO-Homecontrol entity platforms.
More...
#include <platform_entity_base.h>
|
| void | set_parent (IOHomeControlComponent *parent) |
| | Set the parent controller component.
|
| void | set_device_id (const std::string &id) |
| | Set the unique IO-homecontrol device ID (from YAML).
|
| void | set_device_type (DeviceType type) |
| | Set the declared device type (from YAML).
|
| void | set_subtype (uint8_t subtype) |
| | Set the declared device subtype (from YAML).
|
| void | set_optimistic_state (bool optimistic_state) |
| | Enable or disable optimistic target updates for this device (from YAML).
|
| void | set_silent (bool silent) |
| | Send this device's position moves in "silent operation" mode — the reference hub's slower travel profile.
|
| void | set_low_power (bool low_power) |
| | Mark this device as a low-power / duty-cycled receiver.
|
| void | set_system_key (const std::string &key) |
| | Give this device a system key of its own (system_key: in YAML).
|
| void | set_battery_entities (bool battery_entities) |
| | Record that the YAML declared battery: true, so the status log line names the battery level even when the device reports none.
|
| void | set_status_poll_interval (uint32_t poll_interval_ms) |
| | Configure bounded follow-up polling while a state change is expected.
|
Mixin holding the hub-device binding shared by all IO-Homecontrol entity platforms.
Definition at line 38 of file platform_entity_base.h.
◆ log_poll_interval_config_()
| void esphome::home_io_control::DeviceBoundEntity::log_poll_interval_config_ |
( |
const char * | tag | ) |
const |
|
inlineprotected |
Emit the shared two-branch poll-interval line for dump_config().
- Parameters
-
| tag | Log tag of the calling entity. |
Definition at line 117 of file platform_entity_base.h.
◆ passes_binary_update_filter_()
| bool esphome::home_io_control::DeviceBoundEntity::passes_binary_update_filter_ |
( |
const std::string & | id, |
|
|
const IoDevice & | dev ) const |
|
inlinenodiscardprotected |
Shared inbound-update guard for binary endpoints.
Matches this device and accepts only a settled (stopped) status with a known position. Covers and locks intentionally use their own richer guards instead of this filter.
Definition at line 111 of file platform_entity_base.h.
◆ register_device_binding_()
| void esphome::home_io_control::DeviceBoundEntity::register_device_binding_ |
( |
Component * | self, |
|
|
bool | inverted, |
|
|
std::function< void(const std::string &, const IoDevice &)> | on_update ) |
|
inlineprotected |
Perform the shared setup() registration ritual.
Registers the device with the controller, sets its status-poll interval, subscribes the entity's update callback, and schedules the delayed initial status request — in the exact order every entity used before.
- Parameters
-
| self | The entity itself; used for set_timeout(), since DeviceBoundEntity is not a Component. |
| inverted | Initial inversion flag passed to add_device (covers compute it; others pass false). |
| on_update | The entity's device-update callback. |
Definition at line 90 of file platform_entity_base.h.
◆ set_battery_entities()
| void esphome::home_io_control::DeviceBoundEntity::set_battery_entities |
( |
bool | battery_entities | ) |
|
|
inline |
Record that the YAML declared battery: true, so the status log line names the battery level even when the device reports none.
Cover-only in practice.
Definition at line 76 of file platform_entity_base.h.
◆ set_device_id()
| void esphome::home_io_control::DeviceBoundEntity::set_device_id |
( |
const std::string & | id | ) |
|
|
inline |
Set the unique IO-homecontrol device ID (from YAML).
- Parameters
-
| id | Hexadecimal node ID string (e.g., "123ABC"). |
Definition at line 45 of file platform_entity_base.h.
◆ set_device_type()
| void esphome::home_io_control::DeviceBoundEntity::set_device_type |
( |
DeviceType | type | ) |
|
|
inline |
◆ set_low_power()
| void esphome::home_io_control::DeviceBoundEntity::set_low_power |
( |
bool | low_power | ) |
|
|
inline |
Mark this device as a low-power / duty-cycled receiver.
Directed frames to it then set CTRL1_LOW_POWER and use the long wake-up preamble; an always-alive device (the default) gets neither. Radio property of the device, shared by all four platforms.
- Parameters
-
| low_power | True for a battery/solar or otherwise sleeping receiver; default false. |
Definition at line 65 of file platform_entity_base.h.
◆ set_optimistic_state()
| void esphome::home_io_control::DeviceBoundEntity::set_optimistic_state |
( |
bool | optimistic_state | ) |
|
|
inline |
Enable or disable optimistic target updates for this device (from YAML).
Only covers expose this in YAML today; other platforms keep the default (true), which is inert for entity types that never consult the effective target / movement state.
- Parameters
-
| optimistic_state | False to disable optimistic state; default true. |
Definition at line 56 of file platform_entity_base.h.
◆ set_parent()
◆ set_silent()
| void esphome::home_io_control::DeviceBoundEntity::set_silent |
( |
bool | silent | ) |
|
|
inline |
Send this device's position moves in "silent operation" mode — the reference hub's slower travel profile.
Cover-only in practice; harmless on other platforms, which never issue position moves.
Definition at line 60 of file platform_entity_base.h.
◆ set_status_poll_interval()
| void esphome::home_io_control::DeviceBoundEntity::set_status_poll_interval |
( |
uint32_t | poll_interval_ms | ) |
|
|
inline |
Configure bounded follow-up polling while a state change is expected.
- Parameters
-
| poll_interval_ms | Poll interval in milliseconds; zero keeps the default single settle poll only. |
Definition at line 79 of file platform_entity_base.h.
◆ set_subtype()
| void esphome::home_io_control::DeviceBoundEntity::set_subtype |
( |
uint8_t | subtype | ) |
|
|
inline |
◆ set_system_key()
| void esphome::home_io_control::DeviceBoundEntity::set_system_key |
( |
const std::string & | key | ) |
|
|
inline |
Give this device a system key of its own (system_key: in YAML).
Every exchange with the device then uses this key instead of the hub's. The key is validated as 32 hex characters at config time, so a parse failure here leaves the device on the hub key.
- Parameters
-
Definition at line 71 of file platform_entity_base.h.
◆ battery_entities_
| bool esphome::home_io_control::DeviceBoundEntity::battery_entities_ {false} |
|
protected |
◆ device_id_
| std::string esphome::home_io_control::DeviceBoundEntity::device_id_ |
|
protected |
◆ device_type_
◆ has_system_key_
| bool esphome::home_io_control::DeviceBoundEntity::has_system_key_ {false} |
|
protected |
◆ low_power_
| bool esphome::home_io_control::DeviceBoundEntity::low_power_ {false} |
|
protected |
◆ optimistic_state_
| bool esphome::home_io_control::DeviceBoundEntity::optimistic_state_ {true} |
|
protected |
◆ parent_
◆ silent_
| bool esphome::home_io_control::DeviceBoundEntity::silent_ {false} |
|
protected |
◆ status_poll_interval_ms_
| uint32_t esphome::home_io_control::DeviceBoundEntity::status_poll_interval_ms_ {0} |
|
protected |
◆ subtype_
| uint8_t esphome::home_io_control::DeviceBoundEntity::subtype_ {0} |
|
protected |
◆ system_key_
| uint8_t esphome::home_io_control::DeviceBoundEntity::system_key_[AES_KEY_SIZE] {} |
|
protected |
The documentation for this class was generated from the following file: