Hi,
I am using tasmota for sonoff basic. 1 for a Light and 1 for a Fan.
Sonoff gpio 14 configured as 09switch. Switchmode: 1, Switchtopic: 1.
Following is the mqtt config for both sonoffs:
The following is the config for Home Assistant:
mqtt:
broker: 192.168.0.18
port: 1883
client_id: home-assistant
keepalive: 60
username: admin
password: admin
protocol: 3.1
birth_message:
topic: "tele/hass/LWT"
payload: "Online"
qos: 1
retain: true
will_message:
topic: "tele/hass/LWT"
payload: "Offline"
qos: 1
retain: true
switch:
- platform: mqtt
name: "Light"
state_topic: "stat/sonoff/POWER"
command_topic: "cmnd/sonoff/POWER"
availability_topic: "tele/sonoff/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: true
- platform: mqtt
name: "Fan"
state_topic: "stat/sonoff1/POWER"
command_topic: "cmnd/sonoff1/POWER"
availability_topic: "tele/sonoff1/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: true
Issue:
As soon as i toggle sonoff from either the external switch or tasmota web-page, it toggles back immidiately to previous state. But it does not happen when i toggle it from Home Assistant dashboard.
This happened when i added 1 more sonoff. Before that it was working fine.
What am i doing wrong? Please help!