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

Diagnostic text sensor that publishes the cached device name. More...

#include <platform_device_name_text_sensor.h>

Inheritance diagram for esphome::home_io_control::IOHomeDeviceNameTextSensor:
Collaboration diagram for esphome::home_io_control::IOHomeDeviceNameTextSensor:

Public Member Functions

void setup () override
 Register the device-update subscription and schedule an initial name fetch.
void dump_config () override
 Dump text-sensor configuration to the log.
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
IOHomeControlComponentparent_ {nullptr}
std::string device_id_

Detailed Description

Diagnostic text sensor that publishes the cached device name.

Beyond the shared companion behavior it also queues one boot-time GET_NAME request so the cache gets populated without waiting for unrelated traffic.

Definition at line 19 of file platform_device_name_text_sensor.h.

Member Function Documentation

◆ dump_config()

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

Dump text-sensor configuration to the log.

Definition at line 25 of file platform_device_name_text_sensor.cpp.

◆ get_setup_priority()

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

Get setup priority so the parent hub is available first.

Returns
setup_priority::DATA.

Definition at line 29 of file platform_device_name_text_sensor.h.

◆ setup()

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

Register the device-update subscription and schedule an initial name fetch.

Definition at line 15 of file platform_device_name_text_sensor.cpp.

Here is the call graph for this function:

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