mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
c8ccb06f11e28c035f2d340444cfb3b3e49110ff
Don't try to update CT clamp's state with NaN values returned from the underlaying sensor. A single IO error in the sensor code will cause a NaN to be returned and if we use that in CTClampSensor's floating point maths both sample_sum_ and offset_ will become NaN and from there every future calculation will use the NaN offset_ and return NaN too.
ESPHome

Documentation: https://esphome.io/
For issues, please go to the issue tracker.
For feature requests, please see feature requests.
Description
Languages
C++
68.3%
Python
31.5%
C
0.1%