7#include "esphome/core/log.h"
16 return "not sent (no sequence reserved)";
18 std::string summary = report.
intent.empty() ?
"command" : report.
intent;
22 summary += std::to_string(report.
sequence);
24 summary +=
" (not sent)";
29 ESP_LOGCONFIG(
"home_io_control.button",
"IO-Homecontrol 1W Command Button");
30 ESP_LOGCONFIG(
"home_io_control.button",
" Controller: %s", this->
controller_id_.c_str());
35 ESP_LOGCONFIG(
"home_io_control.button",
"IO-Homecontrol 1W Enroll Button");
36 ESP_LOGCONFIG(
"home_io_control.button",
" Controller: %s", this->
controller_id_.c_str());
52 ESP_LOGCONFIG(
"home_io_control.text_sensor",
"IO-Homecontrol Last 1W Command Sensor");
53 ESP_LOGCONFIG(
"home_io_control.text_sensor",
" Controller: %s", this->
controller_id_.c_str());
IOHomeControlComponent * parent_
void setup() override
Subscribe to the hub's per-command reports.
void dump_config() override
Dump text-sensor configuration to the log.
std::string controller_id_
const char * oneway_button_action_name(OneWayButtonAction action)
Human-readable name for a button action, as it appears in the diagnostic sensor.
const char * device_type_name(DeviceType type)
Convert a DeviceType to a lowercase string identifier.
std::string format_oneway_command_report(const OneWayCommandReport &report)
Build the sensor string for one command report.
What a 1W command attempt did — the only feedback this feature can ever produce.
std::string intent
Decoded intent, e.g. "STOP" or "CLOSE".
bool sequence_reserved
True if a sequence was consumed (0 is a valid sequence).
DeviceType target_type
Device class addressed.
bool transmitted
True if at least one copy reached the radio.
std::string controller_id
Identity that transmitted (empty if unresolved).
uint16_t sequence
Sequence consumed; meaningless unless sequence_reserved.