Hi - I have homeassistant with basic sonoff switches and POW and POW R2 switches. I cannot get the switches to report their power state correctly if the server restarted.
Here is my config for the basic switches
- platform: mqtt
name: “Pool Water”
state_topic: “stat/poolwater/POWER”
value_template: “{{ value_json.POWER }}”
command_topic: “cmnd/poolwater/POWER”
payload_on: “ON”
payload_off: “OFF”
availability_topic: “tele/poolwater/LWT”
payload_available: “Online”
payload_not_available: “Offline”
qos: 1
retain: false
Here is my config for the POW switches
- platform: mqtt
name: “Pump Garden”
state_topic: “stat/pumpgarden/POWER”
value_template: “{{ value_json.POWER }}”
command_topic: “cmnd/pumpgarden/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: false
Please assist - thanks so much