|
ESPHome 2026.11.0-dev
|
A sensor pointer that may be null plus the last value it published, stored inline. More...
#include <sensor_with_dedup.h>
Public Member Functions | |
| void | set_sensor (Sensor *sens) |
| void | publish_state_if_not_dup (T state) |
| void | publish_state_unknown () |
| bool | has_sensor () const |
| Sensor * | get_sensor () const |
Protected Attributes | |
| Sensor * | sens_ {nullptr} |
| Deduplicator< T > | dedup_ |
A sensor pointer that may be null plus the last value it published, stored inline.
Publishing does nothing when no sensor is set, and skips a value equal to the last one.
Definition at line 22 of file sensor_with_dedup.h.
|
inline |
Definition at line 42 of file sensor_with_dedup.h.
|
inline |
Definition at line 41 of file sensor_with_dedup.h.
|
inline |
Definition at line 29 of file sensor_with_dedup.h.
|
inline |
Definition at line 35 of file sensor_with_dedup.h.
|
inline |
Definition at line 24 of file sensor_with_dedup.h.
|
protected |
Definition at line 46 of file sensor_with_dedup.h.
|
protected |
Definition at line 45 of file sensor_with_dedup.h.