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

Diagnostic sensor that publishes a device's cumulative count of outbound exchanges that timed out (no valid response) — see detail::record_exchange_timeout() in hub_internal.h. More...

#include <platform_companion_sensors.h>

Inheritance diagram for esphome::home_io_control::IOHomeExchangeFailuresSensor:
Collaboration diagram for esphome::home_io_control::IOHomeExchangeFailuresSensor:

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_

Detailed Description

Diagnostic sensor that publishes a device's cumulative count of outbound exchanges that timed out (no valid response) — see detail::record_exchange_timeout() in hub_internal.h.

Unlike the RSSI and Last Contact sensors, zero is a meaningful value here (no failures yet), so this publishes on setup unconditionally.

Definition at line 115 of file platform_companion_sensors.h.

Member Function Documentation

◆ counter_value()

uint16_t esphome::home_io_control::IOHomeExchangeFailuresSensor::counter_value ( const IoDevice & dev) const
inlinenodiscardoverrideprotectedvirtual

Return the counter this sensor publishes.

Parameters
devDevice record to read the count from.

Implements esphome::home_io_control::IOHomeDeviceCounterSensor.

Definition at line 122 of file platform_companion_sensors.h.

◆ dump_config()

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

Dump sensor configuration to the log.

Definition at line 71 of file platform_companion_sensors.cpp.


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