Binary switch entity for IO‑Homecontrol on/off devices.
More...
#include <platform_switch.h>
|
| void | write_state (bool state) override |
| | Write state change to the device.
|
| void | on_device_update_ (const std::string &id, const IoDevice &dev) |
| | Callback when device state changes (e.g., from a remote).
|
Binary switch entity for IO‑Homecontrol on/off devices.
Definition at line 21 of file platform_switch.h.
◆ dump_config()
| void esphome::home_io_control::IOHomeSwitch::dump_config |
( |
| ) |
|
|
override |
◆ get_setup_priority()
| float esphome::home_io_control::IOHomeSwitch::get_setup_priority |
( |
| ) |
const |
|
inlinenodiscardoverride |
Get setup priority (DATA).
- Returns
- setup_priority::DATA.
Definition at line 29 of file platform_switch.h.
◆ on_device_update_()
| void esphome::home_io_control::IOHomeSwitch::on_device_update_ |
( |
const std::string & | id, |
|
|
const IoDevice & | dev ) |
|
protected |
Callback when device state changes (e.g., from a remote).
- Parameters
-
Definition at line 30 of file platform_switch.cpp.
◆ set_device_id()
| void esphome::home_io_control::IOHomeSwitch::set_device_id |
( |
const std::string & | id | ) |
|
|
inline |
◆ set_device_type()
| void esphome::home_io_control::IOHomeSwitch::set_device_type |
( |
DeviceType | type | ) |
|
|
inline |
Set the declared device type (from YAML).
- Parameters
-
Definition at line 39 of file platform_switch.h.
◆ set_parent()
◆ set_status_poll_interval()
| void esphome::home_io_control::IOHomeSwitch::set_status_poll_interval |
( |
uint32_t | poll_interval_ms | ) |
|
|
inline |
Configure bounded follow-up polling while a state change is expected.
- Parameters
-
| poll_interval_ms | Poll interval in milliseconds; zero keeps the default single settle poll only. |
Definition at line 45 of file platform_switch.h.
◆ set_subtype()
| void esphome::home_io_control::IOHomeSwitch::set_subtype |
( |
uint8_t | subtype | ) |
|
|
inline |
Set the declared device subtype (from YAML).
- Parameters
-
Definition at line 42 of file platform_switch.h.
◆ setup()
| void esphome::home_io_control::IOHomeSwitch::setup |
( |
| ) |
|
|
override |
◆ write_state()
| void esphome::home_io_control::IOHomeSwitch::write_state |
( |
bool | state | ) |
|
|
overrideprotected |
Write state change to the device.
- Parameters
-
| state | Desired on/off state. |
Definition at line 24 of file platform_switch.cpp.
◆ device_id_
| std::string esphome::home_io_control::IOHomeSwitch::device_id_ |
|
protected |
◆ device_type_
◆ parent_
◆ status_poll_interval_ms_
| uint32_t esphome::home_io_control::IOHomeSwitch::status_poll_interval_ms_ {0} |
|
protected |
◆ subtype_
| uint8_t esphome::home_io_control::IOHomeSwitch::subtype_ {0} |
|
protected |
The documentation for this class was generated from the following files: