Hi!
I have an MQTT sensor set up like this:
- platform: mqtt
name: "rtl_433_Temperature1"
state_topic: "stat/rtl_433"
value_template: "{% if value_json.id == 231 and value_json.model == 'Nexus Temperature' %} {{ value_json.temperature_C }} {% endif %}"
It works fine, displaying the correct temperature whenever it is being distributed via MQTT. However, the sensor only holds that value until another MQTT message with another ID - not matching the if-statement in the template - arrives. Then it is set to NULL. How can I get the sensor to keep the value until it reads a new value matching the if statement?
Thanks!