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

Button entity that sends one 1W command as a configured controller identity. More...

#include <platform_oneway_entities.h>

Inheritance diagram for esphome::home_io_control::IOHomeOneWayCommandButton:
Collaboration diagram for esphome::home_io_control::IOHomeOneWayCommandButton:

Public Member Functions

void set_action (OneWayButtonAction action)
 Set which command a press sends.
void setup () override
void dump_config () override
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::OneWayControllerBound
void set_controller_id (const std::string &id)
 Set the controller identity this entity acts as / reports on.
Public Member Functions inherited from esphome::home_io_control::HubBoundEntity
void set_parent (IOHomeControlComponent *parent)
 Set the parent controller component.

Protected Member Functions

void press_action () override
 Queue the command.

Protected Attributes

OneWayButtonAction action_ {OneWayButtonAction::STOP}
Protected Attributes inherited from esphome::home_io_control::OneWayControllerBound
std::string controller_id_
Protected Attributes inherited from esphome::home_io_control::HubBoundEntity
IOHomeControlComponentparent_ {nullptr}

Detailed Description

Button entity that sends one 1W command as a configured controller identity.

A press is fire-and-forget. Nothing replies, so a press that a device ignores looks exactly like one it obeyed — IOHomeOneWayLastCommandTextSensor reports what was transmitted, which is the only half of that the hub can know.

Definition at line 41 of file platform_oneway_entities.h.

Member Function Documentation

◆ dump_config()

void esphome::home_io_control::IOHomeOneWayCommandButton::dump_config ( )
override

Definition at line 28 of file platform_oneway_entities.cpp.

Here is the call graph for this function:

◆ get_setup_priority()

float esphome::home_io_control::IOHomeOneWayCommandButton::get_setup_priority ( ) const
inlinenodiscardoverride

Get setup priority so the parent hub is available first.

Returns
setup_priority::DATA.

Definition at line 52 of file platform_oneway_entities.h.

◆ press_action()

void esphome::home_io_control::IOHomeOneWayCommandButton::press_action ( )
inlineoverrideprotected

Queue the command.

It goes through the operation queue like all radio work, so it cannot interleave with a 2W exchange (ADR 0013).

Definition at line 57 of file platform_oneway_entities.h.

◆ set_action()

void esphome::home_io_control::IOHomeOneWayCommandButton::set_action ( OneWayButtonAction action)
inline

Set which command a press sends.

Parameters
actionButton action (see encode_oneway_action()).

Definition at line 45 of file platform_oneway_entities.h.

◆ setup()

void esphome::home_io_control::IOHomeOneWayCommandButton::setup ( )
inlineoverride

Definition at line 47 of file platform_oneway_entities.h.

Member Data Documentation

◆ action_

OneWayButtonAction esphome::home_io_control::IOHomeOneWayCommandButton::action_ {OneWayButtonAction::STOP}
protected

Definition at line 59 of file platform_oneway_entities.h.


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