23#include "esphome/core/application.h"
81 std::function<
void(
const std::string &,
const IoDevice &)> on_update,
82 bool schedule_initial_poll =
true) {
86 this->
parent_->register_device_callback(std::move(on_update));
87 if (!schedule_initial_poll)
108 ESP_LOGCONFIG(tag,
" Status Poll Interval: device-hinted settle polling (no fixed interval)");
158 this->
parent_->register_device_callback([
this, publish](
const std::string &
id,
const IoDevice &dev) {
163 if (
const auto *dev = this->
parent_->get_device(this->device_id_); dev !=
nullptr)
Mixin holding the parent + device-id binding shared by per-device entities that are not full entity p...
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 set_low_power(bool low_power)
Mark this device as a low-power / duty-cycled receiver.
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_silent(bool silent)
Send this device's position moves in "silent operation" mode — the reference hub's slower travel prof...
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 register_device_binding_(Component *self, bool inverted, std::function< void(const std::string &, const IoDevice &)> on_update, bool schedule_initial_poll=true)
Perform the shared setup() registration ritual.
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.
Mixin for entities bound to the hub itself rather than to one device.
void set_parent(IOHomeControlComponent *parent)
Set the parent controller component.
IOHomeControlComponent * parent_
The main IO-Homecontrol component.
Mixin for the hub-level entities that additionally scope themselves to one oneway_controllers: identi...
std::string controller_id_
void set_controller_id(const std::string &id)
Set the controller identity this entity acts as / reports on.
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.
bool effective_is_stopped(const IoDevice &dev)
Whether a consumer should treat the device as at rest, prediction first.
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.