|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Button entity that sends one non-positional cover command on press. More...
#include <platform_cover_controls.h>
Public Member Functions | |
| void | set_command (CoverCommand command) |
| Set which cover command a press sends. | |
| void | setup () override |
| Initialize the generated button. | |
| void | dump_config () override |
| Dump button configuration to the log. | |
| float | get_setup_priority () const override |
| Get setup priority so the parent hub is available first. | |
| Public Member Functions inherited from esphome::home_io_control::DeviceBoundCompanion | |
| void | set_parent (IOHomeControlComponent *parent) |
| Set the parent controller component. | |
| void | set_device_id (const std::string &id) |
| Set the device ID whose state this companion sensor exposes. | |
Protected Member Functions | |
| void | press_action () override |
| Handle a Home Assistant button press by queueing this button's cover command, which is then sent to the device via the authenticated exchange like any other cover command. | |
| Protected Member Functions inherited from esphome::home_io_control::DeviceBoundCompanion | |
| void | register_companion_binding_ (const std::function< void(const IoDevice &)> &publish) |
| Shared setup() body: subscribe to this device's updates and publish the initial state. | |
Protected Attributes | |
| CoverCommand | command_ {CoverCommand::FAVORITE} |
| Protected Attributes inherited from esphome::home_io_control::DeviceBoundCompanion | |
| IOHomeControlComponent * | parent_ {nullptr} |
| std::string | device_id_ |
Button entity that sends one non-positional cover command on press.
One class covers both companions the cover platform generates: codegen calls set_command() with CoverCommand::FAVORITE for the favorite/"My"-position button (position-capable device types) and CoverCommand::VENT for the ventilation button (window-type devices — WINDOW_OPENER, VENTILATION_POINT — where the vent command moves the actuator to a predefined partially-open position suitable for air exchange). The press path, the parent/device guards and the log wording are identical for both; only the command byte differs.
Definition at line 34 of file platform_cover_controls.h.
|
override |
Dump button configuration to the log.
Definition at line 34 of file platform_cover_controls.cpp.
|
inlinenodiscardoverride |
Get setup priority so the parent hub is available first.
Definition at line 49 of file platform_cover_controls.h.
|
overrideprotected |
Handle a Home Assistant button press by queueing this button's cover command, which is then sent to the device via the authenticated exchange like any other cover command.
Definition at line 18 of file platform_cover_controls.cpp.
|
inline |
Set which cover command a press sends.
| command | CoverCommand::FAVORITE for the favorite-position companion, CoverCommand::VENT for the ventilation companion. |
Definition at line 39 of file platform_cover_controls.h.
|
inlineoverride |
Initialize the generated button.
Definition at line 42 of file platform_cover_controls.h.
|
protected |
Definition at line 56 of file platform_cover_controls.h.