ESPHome 2026.5.0-dev
Loading...
Searching...
No Matches
analog_threshold_binary_sensor.h
Go to the documentation of this file.
1#pragma once
2
7
8namespace esphome {
9namespace analog_threshold {
10
12 public:
13 void dump_config() override;
14 void setup() override;
15
16 void set_sensor(sensor::Sensor *analog_sensor);
17 template<typename T> void set_upper_threshold(T upper_threshold) { this->upper_threshold_ = upper_threshold; }
18 template<typename T> void set_lower_threshold(T lower_threshold) { this->lower_threshold_ = lower_threshold; }
19
20 protected:
24 bool raw_state_{false}; // Pre-filter state for hysteresis logic
25};
26
27} // namespace analog_threshold
28} // namespace esphome
Function-pointer-only templatable storage (4 bytes on 32-bit).
Definition automation.h:40
Base class for all binary_sensor-type classes.
Base-class for all sensors.
Definition sensor.h:47
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7