MQTT info not getting through to HA

Until recently I have been able to import / display my oil tank & diesel tank levels through a RaspberryPi Zero with an rtl_433 aerial picking up the data sent from my two (Watchman) tank monitors. This is then forwarded to my MQTT broker - which is the HA MQTT Integration.

But recently the time stamp information for BOTH tanks is not getting through to HA and I can’t work out why.

This is an example of what is being sent from the RPi Zero to the HA MQTT broker (as seen within an app called MQTT Explorer).

Whilst everything other than the Last Time Stamp get shown on my Lovelace card, within Developer Tools > States the sensor.oil_last_time_stamp entity shows as “unknown”.

This is part of the content of my /config/mqtt.yaml file

   - name: "Oil Last Time Stamp"    
     state_topic: "home/rtl_433"    
     value_template: >      
       {% if value_json is defined and == 136628653 %}        
         {{ (value_json.time) }}      
       {% else %}        
         {{ states('sensor.oil_last_time_stamp') }}      
       {% endif %}    
     unit_of_measurement: 'UTC'

Question … How can I get there Time Stamp data to display correctly again?


As of recently, " unit_of_measurement" is only valid for numeric sensors. Remove it.

Thank you so much! It is now working again :grinning: