21#include "esphome/components/button/button.h"
22#include "esphome/components/switch/switch.h"
23#include "esphome/components/text_sensor/text_sensor.h"
24#include "esphome/core/component.h"
59 virtual void arm(
bool state) = 0;
162 void setup()
override;
Shared body for the hub-level arming switches.
float get_setup_priority() const final
Get setup priority so the parent hub is available first.
virtual void arm(bool state)=0
Arm or disarm this switch's listener on the hub.
void write_state(bool state) final
Forward the toggle to the hub and publish the state.
virtual void subscribe_armed(std::function< void(bool)> callback)=0
Subscribe callback to the hub's armed-state changes for this listener.
void setup() final
Register the armed-state callback so this entity mirrors the hub's own disarm events.
Mixin for entities bound to the hub itself rather than to one device.
IOHomeControlComponent * parent_
Hub-level switch entity: ON arms the key-extraction responder for 10 minutes, OFF disarms it immediat...
void arm(bool state) override
Arm or disarm this switch's listener on the hub.
void subscribe_armed(std::function< void(bool)> callback) override
Subscribe callback to the hub's armed-state changes for this listener.
void dump_config() override
Dump configuration to the log.
virtual void set_key_extraction_armed(bool armed)
Arm or disarm the "Recover System Key" (key extraction) responder.
virtual void set_oneway_key_adoption_armed(bool armed)
Arm or disarm the 1W controller-key adoption listener.
void set_oneway_key_adoption_armed_callback(std::function< void(bool)> cb)
Register a callback invoked whenever the 1W key-adoption armed state changes — manual toggle,...
void trigger_scan_paired_devices()
Entry point for the "Scan Paired Devices" button: run the roll-call and publish its report to the log...
virtual void queue_discover_and_pair()
Queue a pairing operation; executed in loop() when radio idle.
void set_key_extraction_armed_callback(std::function< void(bool)> cb)
Register a callback invoked whenever the key-extraction armed state changes — manual toggle,...
Diagnostic text sensor that publishes PairingTelemetry::result_sensor_string() after every pairing at...
void setup() override
Register the pairing-result callback.
void on_pairing_result_()
Publish the latest pairing telemetry result string.
float get_setup_priority() const override
Get setup priority so the parent hub is available first.
void dump_config() override
Dump text-sensor configuration to the log.
Hub-level switch entity: ON arms the 1W key-recovery listener, OFF disarms it immediately.
void subscribe_armed(std::function< void(bool)> callback) override
Subscribe callback to the hub's armed-state changes for this listener.
void arm(bool state) override
Arm or disarm this switch's listener on the hub.
void dump_config() override
Dump configuration to the log.
IO-Homecontrol ESPHome component — protocol controller.