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"
10
11namespace esphome {
12namespace 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
20class 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
Mixin holding the hub/device binding shared by the auto-generated per-device companion diagnostic sen...
Diagnostic sensor that publishes a device's smoothed (EMA) RSSI in dBm.
float get_setup_priority() const override
Get setup priority so the parent hub is available first.
void setup() override
Register the device-update subscription and publish the initial cached state.
void dump_config() override
Dump sensor configuration to the log.
Shared device-binding mixins for IO-Homecontrol entity platforms.