I am very new and trying to setup a mqtt sensor for a sonoff plug.
I have setup a simple example with one item in the config. I tried to include as much as possible. Any help is appreciated.
here is the groups.yaml
The payload published to tele/SNF-Washer/SENSOR looks like it will be parsed correctly by the template: "{{value_json['ENERGY'].Power }}"
Have you confirmed that Home Assistant is connected to the MQTT Broker? Please show its MQTT configuration (remove any password you may be using before posting the MQTT configuration here).
I’m having exactly the same problem. I’ve copied and pasted from here https://www.digiblur.com/2018/11/smart-laundry-notifications-with-sonoff.html. ('ll post my config files and any relevant error messages when I get home from today. Only thing I’ve changedi I’ve taken out the stuffsrelate to the dryer as s I won’t be using that . And for the purposes of testing, I’ve commented out all but one of the sensors, and have ledt that sensor uncommented out in the groups.yaml
Looks like I figured it out. Seems that I had the wrong mqtt topic. I was going with what the code had, /tele/SNF-Washer/SENSOR and I needed SNF-Washer/tele/SENSOR. Once I made that change it all worked.
Yeah if you use MQTT Discovery it rearranges the topic.
Also I found this week that the sensor information is only reported by Tasmota using the Tele period which defaults to 300 seconds/5 minutes. This means HA may not report the sensor status until the Tele period expires.
I also found that you can do a SensorRetain 1 in Tasmota console to make the sensor status retained so it will be immediately available to HA upon a restart. This may or nay not be what you want… I am using that with temperature/pressure/humidity/lux sensors.