I know, this is an issue of z-wave (over zwavejs2mqtt) or the devices from Fibaro. I usually ignored wrong values and I never had any false values anymore. Can I do this in Home Assistant as well?
Python script that worked with another software:
temperatureSensor = dev.states["sensorValue"]
dev = indigo.devices[678453345] # Temperature Sensor
check = dev.states["sensorValue.ui"] #sometimes it mixed up values and reports something else than "C".
if "C" in check and temperatureSensor != 0 and temperatureSensor > -20 and temperatureSensor < 120 and (temperatureSensor < 0 or temperatureSensor > 0.09):
From zwavejs2mqtt
[37-49-0-Air temperature] Air temperature
429.2 °C
Is this possible to do directly or do I need to make a sensor template like this?
- sensor:
- name: "Temperature 1"
unique_id: temperature_1
unit_of_measurement: "°C"
device_class: temperature
state: >
{% if states('sensor.v_temperature_1')|float > -20 and states('sensor.v_temperature_1')|float < 120 and states('sensor.v_temperature_1')|float != 0 and ( states('sensor.v_temperature_1')|float < 0 or states('sensor.v_temperature_1')|float > 0.09 ) %}
{{ (states('sensor.v_temperature_1') | float )| round(1)}}
{% else %}
{{ (states('sensor.temperature_1') | float )| round(1)}}
{% endif %}
Is there a way to check for the unit from zwavejs? Check if it is “C”?
You need the template as (from what I know) you cannot correct into the sensor itself…I have two corrective sensors as well