Hello. I use this sensor in order to convert pressure from hPa to mmHg:
- platform: template
sensors:
pressure_cal:
value_template: '{{ "%.1f" | format(states("sensor.0x00158d000349c2f8_pressure") | float * 0.75006375541921) }}'
unit_of_measurement: mmHg
The data of 0x00158d000349c2f8_pressure
sensor is provided by zigbee2mqtt. But when the zigbee2mqtt is restarting, the sensor 0x00158d000349c2f8_pressure
have the undefined state. At the same time pressure_cal
sensor obtains value 0.
So the pressure_cal
plot looks like this:
Is it possible to tell HA not to change value of pressure_cal
to zero if the 0x00158d000349c2f8_pressure
state equals “undefined”?
1 post - 1 participant