mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
fix sen5x negative temperature (#6082)
This commit is contained in:
parent
4cc17dac0d
commit
343a8c063e
1 changed files with 1 additions and 1 deletions
|
@ -352,7 +352,7 @@ void SEN5XComponent::update() {
|
||||||
float humidity = measurements[4] / 100.0;
|
float humidity = measurements[4] / 100.0;
|
||||||
if (measurements[4] == 0xFFFF)
|
if (measurements[4] == 0xFFFF)
|
||||||
humidity = NAN;
|
humidity = NAN;
|
||||||
float temperature = measurements[5] / 200.0;
|
float temperature = (int16_t) measurements[5] / 200.0;
|
||||||
if (measurements[5] == 0xFFFF)
|
if (measurements[5] == 0xFFFF)
|
||||||
temperature = NAN;
|
temperature = NAN;
|
||||||
float voc = measurements[6] / 10.0;
|
float voc = measurements[6] / 10.0;
|
||||||
|
|
Loading…
Reference in a new issue