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