I have a sonoff (tasmota flashed with 6.7.1) correctly integrated in homeassitant.
This is integration:
- platform: mqtt
name: "sonoff01"
state_topic: "hass/stat/sonoff01/POWER"
command_topic: "hass/cmnd/sonoff01/POWER"
availability_topic: "hass/tele/sonoff01/LWT"
qos: 0
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
optimistic: false
retain: false
I would get a sensor with wifi/RSSI strenght. So i did add
- platform: mqtt
state_topic: '/hass/tele/sonoff01/STATE'
value_template: "{{ value_json.Wifi.RSSI }}"
name: 'sonoff01_wifi_strength'
unit_of_measurement: '%'
I got the sensor into homeassistant, but it is showed with “unknown”. I did wait more than 5minutes of tele.
If I type into console of web interface of sonoff I got the right payload
{
"Time": "2019-11-10T14:00:57",
"Uptime": "0T00:05:19",
"UptimeSec": 319,
"Heap": 28,
"SleepMode": "Dynamic",
"Sleep": 50,
"LoadAvg": 19,
"MqttCount": 1,
"POWER": "OFF",
"Wifi": {
"AP": 1,
"SSId": "ffff",
"BSSId": "ff:ff:ff:ff",
"Channel": 5,
"RSSI": 76,
"LinkCount": 1,
"Downtime": "0T00:00:08"
}
}
Thank you for your support!