6#include "esphome/core/log.h"
11static const char *
const TAG =
"home_io_control.switch";
18 this->
parent_->register_device_callback(
43 LOG_SWITCH(
"",
"IO-Homecontrol Binary Switch",
this);
44 ESP_LOGCONFIG(
TAG,
" Device ID: %s", this->
device_id_.c_str());
46 ESP_LOGCONFIG(
TAG,
" Status Poll Interval: default single settle poll");
50 ESP_LOGCONFIG(
TAG,
" Status: experimental and untested");
IOHomeControlComponent * parent_
uint32_t status_poll_interval_ms_
void dump_config() override
Dump configuration to log.
void on_device_update_(const std::string &id, const IoDevice &dev)
Callback when device state changes (e.g., from a remote).
void write_state(bool state) override
Write state change to the device.
void setup() override
Initialize the switch entity.
Internal helpers shared by the hub implementation .cpp files.
constexpr uint32_t INITIAL_STATUS_REQUEST_DELAY_MS
Delay before the first post-boot status request from an entity.
constexpr float BINARY_ENTITY_ON_POSITION_THRESHOLD
Shared 0-100 cutoff: values below this mean binary "on".
static constexpr float UNKNOWN_POSITION
Sentinel value meaning "position is not known yet".
static const char *const TAG
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.