Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
platform_rssi_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
/// @file platform_rssi_sensor.h
4
/// @brief Diagnostic sensor exposing a device's smoothed RSSI.
5
/// @ingroup hioc_platforms
6
7
#include "esphome/components/sensor/sensor.h"
8
#include "esphome/core/component.h"
9
#include "
platform_entity_base.h
"
10
11
namespace
esphome
{
12
namespace
home_io_control
{
13
14
/// @brief Diagnostic sensor that publishes a device's smoothed (EMA) RSSI in dBm.
15
///
16
/// Publishes nothing until the first RX from this device seeds the EMA (see
17
/// detail::update_link_health() in hub_internal.h) — Home Assistant shows the entity as
18
/// unavailable until then, rather than a misleading 0 dBm.
19
/// @ingroup hioc_platforms
20
class
IOHomeRssiSensor
:
public
sensor::Sensor,
public
Component,
public
DeviceBoundCompanion
{
21
public
:
22
/// @brief Register the device-update subscription and publish the initial cached state.
23
void
setup
()
override
;
24
25
/// @brief Dump sensor configuration to the log.
26
void
dump_config
()
override
;
27
28
/// @brief Get setup priority so the parent hub is available first.
29
/// @return setup_priority::DATA.
30
[[nodiscard]]
float
get_setup_priority
()
const override
{
return
setup_priority::DATA; }
31
};
32
33
}
// namespace home_io_control
34
}
// namespace esphome
esphome::home_io_control::DeviceBoundCompanion
Mixin holding the hub/device binding shared by the auto-generated per-device companion diagnostic sen...
Definition
platform_entity_base.h:115
esphome::home_io_control::IOHomeRssiSensor
Diagnostic sensor that publishes a device's smoothed (EMA) RSSI in dBm.
Definition
platform_rssi_sensor.h:20
esphome::home_io_control::IOHomeRssiSensor::get_setup_priority
float get_setup_priority() const override
Get setup priority so the parent hub is available first.
Definition
platform_rssi_sensor.h:30
esphome::home_io_control::IOHomeRssiSensor::setup
void setup() override
Register the device-update subscription and publish the initial cached state.
Definition
platform_rssi_sensor.cpp:14
esphome::home_io_control::IOHomeRssiSensor::dump_config
void dump_config() override
Dump sensor configuration to the log.
Definition
platform_rssi_sensor.cpp:21
esphome::home_io_control
Definition
device_registry.cpp:13
esphome
Definition
device_registry.cpp:12
platform_entity_base.h
Shared device-binding mixins for IO-Homecontrol entity platforms.
components
home_io_control
platform_rssi_sensor.h
Generated by
1.16.1