Hi Guys, I’m currently setting up a new Raspberry Pi with Hass.io and I’m trying to get a Sonoff T1 (3 switch) device to interact with Hass.io.
What I’ve done so far:
- Flashed the Sonoff with Tasmota firmware
- Setup MQTT on Hass.io
- Successfully have a Single Switch Sonoff T1 working via MQTT (proving that MQTT is working fine between the Sonoff and Hass.io)
The difference I’ve noticed with the 3 switch sonoff is that you can’t set individual topics for each switch…the sonoff outputs the switches as: topic/topic/POWER1, topic/topic/POWER2 or topic/topic/POWER3. This is great and I can see the differentiation when I monitor the MQTT traffic on Hass.io (when toggling the switches from the Tasmota web interface).
I’ve added the following to my configuration.yaml file to control the switches from HA:
switch:
- platform: mqtt
name: “Foyer Light”
command_topic: “hal1/1/cmnd/POWER”
state_topic: “hal1/1/POWER1”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true - platform: mqtt
name: “Entrance Light”
command_topic: “hal1/1/cmnd/POWER”
state_topic: “hal1/1/POWER2”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true - platform: mqtt
name: “Water Feature”
command_topic: “hal1/1/cmnd/POWER”
state_topic: “hal1/1/POWER3”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true
You can see that the “state_topic” is different for each instance however when I toggle the switches from within HA, it only ever sends “hal1/1/POWER1”, no matter which of the three switches I click.
Any ideas on what HA could be doing to only send the POWER1 state, and neither of the other two?