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

Diagnostic text sensor that names what is currently limiting a device (e.g. More...

#include <platform_companion_sensors.h>

Inheritance diagram for esphome::home_io_control::IOHomeActiveIssueTextSensor:
Collaboration diagram for esphome::home_io_control::IOHomeActiveIssueTextSensor:

Public Member Functions

void setup () override
 Register the device-update subscription and publish the initial cached state.
void dump_config () override
 Dump text-sensor configuration to the log.
Public Member Functions inherited from esphome::home_io_control::IOHomeCompanionTextSensor
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.

Additional Inherited Members

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 inherited from esphome::home_io_control::DeviceBoundCompanion
IOHomeControlComponent * parent_ {nullptr}
std::string device_id_

Detailed Description

Diagnostic text sensor that names what is currently limiting a device (e.g.

"LIMITATION_BY_RAIN"), letting a "nothing happened" command self-explain instead of only showing up in the log. Shared by every device-bound platform (cover, light, switch, lock) via platform_common.py's companion-sensor codegen.

Two sources, in this order:

  1. The symbolic name of the device's latest explicit CMD_ERROR_RESP result. Cleared by the next successful status/command reply (see detail::clear_command_result()).
  2. "LIMITATION_BY_RAIN" while IoDevice::limited_by_rain is set. That flag is derived from the device's own status replies (the last move was ordered by the rain sensor, or a position command was clamped while rain protection was recently active), because windows do not send an error for a rain clamp. It clears itself when the window stops reporting the rain originator and a command is no longer clamped, so it is only as fresh as the last status reply.

Not a per-operation outcome. Publishes an empty string when neither source applies, so a non-empty value always means "this is still going on" rather than "this is what happened last."

Definition at line 179 of file platform_companion_sensors.h.

Member Function Documentation

◆ dump_config()

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

Dump text-sensor configuration to the log.

Definition at line 113 of file platform_companion_sensors.cpp.

◆ setup()

void esphome::home_io_control::IOHomeActiveIssueTextSensor::setup ( )
override

Register the device-update subscription and publish the initial cached state.

Definition at line 99 of file platform_companion_sensors.cpp.

Here is the call graph for this function:

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