|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Shared device-binding mixins for IO-Homecontrol entity platforms. More...
#include "hub_internal.h"#include "esphome/core/application.h"#include <cinttypes>#include <functional>#include <string>#include <utility>Go to the source code of this file.
Classes | |
| class | esphome::home_io_control::DeviceBoundEntity |
| Mixin holding the hub-device binding shared by all IO-Homecontrol entity platforms. More... | |
| class | esphome::home_io_control::DeviceBoundCompanion |
| Mixin holding the hub/device binding shared by the auto-generated per-device companion diagnostic sensors (device name, active issue, RSSI, last contact, exchange failures). More... | |
Namespaces | |
| namespace | esphome |
| namespace | esphome::home_io_control |
Shared device-binding mixins for IO-Homecontrol entity platforms.
IOHomeCover, IOHomeLight, IOHomeSwitch and IOHomeLock all bind an ESPHome entity to a hub device: the same five YAML setters, the same registration ritual in setup(), and the same poll-interval dump_config line. DeviceBoundEntity centralizes exactly that shared state and wiring. The auto-generated companion diagnostic sensors share a smaller, observe-only binding; DeviceBoundCompanion centralizes that one.
Both are intentionally NOT ESPHome base classes — they are plain mixins the entities inherit alongside their real ESPHome base (cover::Cover, light::LightOutput, switch_::Switch, lock::Lock, text_sensor::TextSensor, sensor::Sensor). Entity-specific state mapping (cover position/tilt/movement inference, binary on/off decoding, each companion's value rendering) deliberately stays in the entities; only the device-binding plumbing lives here.
Definition in file platform_entity_base.h.