j1gg3
(J1gg3)
1
Hallo there,
I‘m not able to get status within my Homeassistant status page when pressing physical button.
Switch:
- platform: mqtt
name: "Computer"
state_topic: "stat/sonoffpc/RESULT"
value_template: '{{ value_json["POWER"] }}'
command_topic: "cmnd/sonoffpc/POWER"
availability_topic: "tele/sonoffpc/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: true
tom_l
2
Please edit your post and format your code as per the blue banner at the top of the page.
stevemann
(Stephen Mann (YAML-challenged))
3
You don’t say that you are using Sonoff Tasmota, but you topics look like you are. I suspect that your state_topic should be ‘stat/sonoffpc/POWER’
For example, here’s one of mine:
- platform: mqtt
name: "Garden Light"
command_topic: "cmnd/Garden/power"
state_topic: "stat/Garden/POWER"
qos: 1
payload_on: "ON"
payload_off: "OFF"
retain: true