My MQTT sensor (retain = true) has worked for over a year, but not now. Mosquitto MQTT broker receives the messages successfully when I listen to the specific topic, but no data shows in HA.
Also, I have a “wind gust” sensor (retain = false) in another topic which updates upon a changed value, and it works without any issues with the same template style.
I found in another thread that someone got a random retained message in mosquitto stuck. I use “retained” as flag, maybe that is not a good idea? Tried to publish an empty message without any success.
I really need your help and suggestions, It’s very much appreciated!
Logger: homeassistant.helpers.template
Source: helpers/template.py:1834
First occurred: 6 February 2022, 11:27:30 (11441 occurrences)
Last logged: 10:17:42
Template variable error: 'value_json' is undefined when rendering '{{ value_json.rainmonth }}'
Template variable error: 'value_json' is undefined when rendering '{{ value_json.wgust10 }}'
Template variable error: 'value_json' is undefined when rendering '{{ value_json.windavg10m }}'
Template variable error: 'value_json' is undefined when rendering '{{ value_json.avgbearing }}'
Template variable error: 'value_json' is undefined when rendering '{{ value_json.press }}'```