I decided to start over from scratch with HASS, as I have neglected it for a while an wantsed to start with a clean slate. I installed it via the 2022.9.4 image in my kubernetes cluster, got it up, and started to configure it from the start wizard. I added the MQTT integration and it immediately found my Tasmota devices, with names, mac addresses, etc. However once added, they all show their sensors as “unavailable”
if i look in my MQTT broker logs, I see connections::
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221110,"msg":"subscribed to topic","topic":"tele/sonoffS31-3/LWT","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221110,"msg":"subscribed to topic","topic":"stat/sonoffS31-3/STATUS10","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221250,"msg":"subscribed to topic","topic":"tele/mastertv/LWT","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221251,"msg":"subscribed to topic","topic":"stat/mastertv/STATUS10","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221251,"msg":"subscribed to topic","topic":"tele/officepcs/LWT","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221251,"msg":"subscribed to topic","topic":"stat/officepcs/STATUS10","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221251,"msg":"subscribed to topic","topic":"tele/firewall/LWT","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221251,"msg":"subscribed to topic","topic":"stat/firewall/STATUS10","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221251,"msg":"subscribed to topic","topic":"tele/refrigerator/LWT","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221251,"msg":"subscribed to topic","topic":"stat/refrigerator/STATUS10","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221252,"msg":"subscribed to topic","topic":"tele/serverrack/LWT","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663364221252,"msg":"subscribed to topic","topic":"stat/serverrack/STATUS10","qos":0,"client":"2mPNrXKhjF2xvCutNjcoKQ","v":1}
my guess is either a config setting in the topic of tasmota, or something in the home assistant config needs to be changed. Here’s a sample config from tasmota:
Any pointers on where to check?
the device also shows the wrong firmware (should say 12.1.0)
edit: it appears that HA is correctly subscripted to the topic:
{"pid":1,"hostname":"mqtt-0","name":"mosca","level":30,"time":1663367322948,"msg":"subscribed to topic","topic":"tele/mastertv/SENSOR","qos":0,"client":"1IVwdrYw5VQjpmi5TmgpKK","v":1}
and i compared this to the manual config of my old home assistant setup:
- platform: mqtt
name: "Sonoff S31-1 Energy"
state_topic: "tele/sonoffS31-1/SENSOR"
value_template: '{{ value_json["ENERGY"]["Today"] }}'
unit_of_measurement: "kWh"
so now my thinking is that the “value template” isn’t being applied properly to the mqtt data?