mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 23:18:10 +01:00
null initialize total sensor for pulse counter (#3803)
* null initialize total sensor. * pedantic styling fix Co-authored-by: Guillermo Ruffino <glm.net@gmail.com> Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
parent
6d267fda01
commit
c61abf6aca
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ class PulseCounterSensor : public sensor::Sensor, public PollingComponent {
|
||||||
PulseCounterStorageBase &storage_;
|
PulseCounterStorageBase &storage_;
|
||||||
uint32_t last_time_{0};
|
uint32_t last_time_{0};
|
||||||
uint32_t current_total_{0};
|
uint32_t current_total_{0};
|
||||||
sensor::Sensor *total_sensor_;
|
sensor::Sensor *total_sensor_{nullptr};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace pulse_counter
|
} // namespace pulse_counter
|
||||||
|
|
Loading…
Reference in a new issue