Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
esphome::home_io_control::IOHomeAcceptForeignPairingSwitch Class Reference

Hub-level switch entity: ON arms the key-extraction responder for 10 minutes, OFF disarms it immediately. More...

#include <platform_hub_controls.h>

Inheritance diagram for esphome::home_io_control::IOHomeAcceptForeignPairingSwitch:
Collaboration diagram for esphome::home_io_control::IOHomeAcceptForeignPairingSwitch:

Protected Member Functions

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.
Protected Member Functions inherited from esphome::home_io_control::HubArmingSwitch
void write_state (bool state) final
 Forward the toggle to the hub and publish the state.

Additional Inherited Members

Public Member Functions inherited from esphome::home_io_control::HubArmingSwitch
void setup () final
 Register the armed-state callback so this entity mirrors the hub's own disarm events.
float get_setup_priority () const final
 Get setup priority so the parent hub is available first.
Public Member Functions inherited from esphome::home_io_control::HubBoundEntity
void set_parent (IOHomeControlComponent *parent)
 Set the parent controller component.
Protected Attributes inherited from esphome::home_io_control::HubBoundEntity
IOHomeControlComponentparent_ {nullptr}

Detailed Description

Hub-level switch entity: ON arms the key-extraction responder for 10 minutes, OFF disarms it immediately.

Publishes its own state changes when the hub disarms itself (successful extraction or auto-off timeout), not just on a user-initiated toggle.

Created dynamically from home_io_control.accept_foreign_pairing: true (see __init__.py's _create_hub_arming_switch()), not through a switch: platform entry — see the file header for why. See key_extraction_responder.cpp for what arming actually does.

Note
Hardware-confirmed on real RF hardware, but not yet against a third-party hub — see key_extraction_responder.cpp.

Definition at line 72 of file platform_hub_controls.h.

Member Function Documentation

◆ arm()

void esphome::home_io_control::IOHomeAcceptForeignPairingSwitch::arm ( bool state)
inlineoverrideprotectedvirtual

Arm or disarm this switch's listener on the hub.

Implements esphome::home_io_control::HubArmingSwitch.

Definition at line 74 of file platform_hub_controls.h.

◆ dump_config()

void esphome::home_io_control::IOHomeAcceptForeignPairingSwitch::dump_config ( )
overrideprotected

Dump configuration to the log.

Definition at line 29 of file platform_hub_controls.cpp.

◆ subscribe_armed()

void esphome::home_io_control::IOHomeAcceptForeignPairingSwitch::subscribe_armed ( std::function< void(bool)> callback)
inlineoverrideprotectedvirtual

Subscribe callback to the hub's armed-state changes for this listener.

Implements esphome::home_io_control::HubArmingSwitch.

Definition at line 75 of file platform_hub_controls.h.


The documentation for this class was generated from the following files: