I have been using MQTT successfully for many years, but I have an issue now that eludes me. I am running HAOS on a Odroid, fwiw with a stand-alone Mosquito server. The external system sends separate topics for volts, amps, watts, etc.; the payload is a simple floating point number. I can track on MQTT Explorer that the topic and payload are as expected. The yaml defs are as follows (these are a brief sample, there are quite a few…):
- name: Air compressor energy
unique_id: "air_compressor_energy"
state_topic: "HomeSeer/Garage/Air compressor kwh/status"
qos: 0
expire_after: 0
device_class: energy
state_class: total_increasing
unit_of_measurement: "kWh"
value_template: "{{value}}"
- name: Air compressor volts
unique_id: "air_compressor_volts"
state_topic: "HomeSeer/Garage/Air compressor volts"
unit_of_measurement: "volts"
value_template: "{{value}}"
Yes, I know the defaults - I specify all the pertinent parms for future clarity; on the volts I intentionally did not. An MQTT switch device on the same physical device works properly and is updated when the switch is toggled. fwiw, the MQTT switch and sensor definitions are in different yaml files. The topic has been verified numerous times - it is copied from MQTT Explorer. The yaml file is obviously being processed since the sensors are created - they just aren’t being updated. New data comes in at the rate of every 60 seconds.
Any suggestions on what I am missing?