21#include "esphome/core/application.h"
66 std::function<
void(
const std::string &,
const IoDevice &)> on_update) {
70 this->
parent_->register_device_callback(std::move(on_update));
90 ESP_LOGCONFIG(tag,
" Status Poll Interval: device-hinted settle polling (no fixed interval)");
135 this->
parent_->register_device_callback([
this, publish](
const std::string &
id,
const IoDevice &dev) {
140 if (
const auto *dev = this->
parent_->get_device(this->device_id_); dev !=
nullptr)
Mixin holding the hub/device binding shared by the auto-generated per-device companion diagnostic sen...
void set_parent(IOHomeControlComponent *parent)
Set the parent controller component.
void register_companion_binding_(const std::function< void(const IoDevice &)> &publish)
Shared setup() body: subscribe to this device's updates and publish the initial state.
void set_device_id(const std::string &id)
Set the device ID whose state this companion sensor exposes.
IOHomeControlComponent * parent_
Mixin holding the hub-device binding shared by all IO-Homecontrol entity platforms.
void register_device_binding_(Component *self, bool inverted, std::function< void(const std::string &, const IoDevice &)> on_update)
Perform the shared setup() registration ritual.
void set_status_poll_interval(uint32_t poll_interval_ms)
Configure bounded follow-up polling while a state change is expected.
void set_optimistic_state(bool optimistic_state)
Enable or disable optimistic target updates for this device (from YAML).
void log_poll_interval_config_(const char *tag) const
Emit the shared two-branch poll-interval line for dump_config().
void set_device_type(DeviceType type)
Set the declared device type (from YAML).
uint32_t status_poll_interval_ms_
void set_subtype(uint8_t subtype)
Set the declared device subtype (from YAML).
void set_device_id(const std::string &id)
Set the unique IO-homecontrol device ID (from YAML).
void set_parent(IOHomeControlComponent *parent)
Set the parent controller component.
IOHomeControlComponent * parent_
bool passes_binary_update_filter_(const std::string &id, const IoDevice &dev) const
Shared inbound-update guard for binary endpoints.
The main IO-Homecontrol component.
Internal helpers shared by the hub implementation .cpp files.
static constexpr float UNKNOWN_POSITION
Sentinel value meaning "position is not known yet".
DeviceType
Device type identifiers reported by IO‑Homecontrol products.
@ UNKNOWN
Unknown/unspecified device.
static constexpr uint32_t INITIAL_STATUS_REQUEST_DELAY_MS
Delay before the first post-boot status request from an entity.
YAML-declared device metadata for registration; defaults match an undeclared device.
Runtime state of a paired IO‑Homecontrol device.
float position
Current position: 0=open, 100=closed, or UNKNOWN_POSITION.
bool is_stopped
True if device is not moving.