mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-31 10:08:27 +02:00
Make the pulse meter timeout on startup when no pulses are received (#5388)
This commit is contained in:
@@ -38,7 +38,8 @@ class PulseMeterSensor : public sensor::Sensor, public Component {
|
||||
InternalFilterMode filter_mode_{FILTER_EDGE};
|
||||
|
||||
// Variables used in the loop
|
||||
bool initialized_ = false;
|
||||
enum class MeterState { INITIAL, RUNNING, TIMED_OUT };
|
||||
MeterState meter_state_ = MeterState::INITIAL;
|
||||
uint32_t total_pulses_ = 0;
|
||||
uint32_t last_processed_edge_us_ = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user