|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Diagnostic sensor that publishes a device's cumulative count of exchanges it authenticated and then never closed — see detail::record_exchange_outcome() in hub_internal.h. More...
#include <platform_companion_sensors.h>
Public Member Functions | |
| void | dump_config () override |
| Dump sensor configuration to the log. | |
| Public Member Functions inherited from esphome::home_io_control::IOHomeDeviceCounterSensor | |
| void | setup () final |
| Register the device-update subscription and publish the initial cached count. | |
| Public Member Functions inherited from esphome::home_io_control::IOHomeCompanionSensor | |
| 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 | |
| uint16_t | counter_value (const IoDevice &dev) const override |
| Return the counter this sensor publishes. | |
| 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. | |
Additional Inherited Members | |
| Protected Attributes inherited from esphome::home_io_control::DeviceBoundCompanion | |
| IOHomeControlComponent * | parent_ {nullptr} |
| std::string | device_id_ |
Diagnostic sensor that publishes a device's cumulative count of exchanges it authenticated and then never closed — see detail::record_exchange_outcome() in hub_internal.h.
Read it against Exchange Failures: that counter rising alone means the device is not hearing the hub, while this one rising means it hears the hub's request and then either the hub's challenge answer or the device's closing reply is lost. For a movement command this outcome is reported as success, so this sensor is the only place it shows up.
Zero is meaningful here (none yet), so this publishes on setup unconditionally.
Definition at line 136 of file platform_companion_sensors.h.
|
inlinenodiscardoverrideprotectedvirtual |
Return the counter this sensor publishes.
| dev | Device record to read the count from. |
Implements esphome::home_io_control::IOHomeDeviceCounterSensor.
Definition at line 143 of file platform_companion_sensors.h.
|
override |
Dump sensor configuration to the log.
Definition at line 77 of file platform_companion_sensors.cpp.