Hey everyone, I wanted to share my recent experience integrating the Sonoff Tasmota with Home Assistant. It was a bit of a learning curve, but I’m thrilled with how it turned out!
I started by flashing the Tasmota firmware onto my Sonoff Basic unit. The web interface looked great, but I ran into some issues when trying to set it up with Home Assistant. I followed a tutorial, but the switch wasn’t working at all. I kept getting errors in the logs, and I wasn’t sure what I was doing wrong.
After some research and troubleshooting, I realized the issue was with my MQTT configuration. I had to adjust the settings in my configuration.yaml file to ensure proper communication between Tasmota and Home Assistant. Here’s what worked for me:
yaml
mqtt:
broker: domus1
port: 1883
client_id: home-assistant-1
keepalive: 60
username: admin
password: admin
protocol: 3.1
birth_message:
topic: “tele/hass1/LWT”
payload: “Online”
qos: 1
retain: true
will_message:
topic: “tele/hass1/LWT”
payload: “Offline”
qos: 1
retain: true
switch:
- platform: mqtt
name: “Phone Charger”
state_topic: “stat/sonoff/POWER”
command_topic: “cmnd/sonoff/power”
qos: 0
payload_on: “on”
payload_off: “off”
optimistic: false
retain: true
Once I got the MQTT settings right, everything started working smoothly. I could control the switch from the Home Assistant interface, and it integrated perfectly with my existing smart home setup. I even set up some automations to turn it on and off based on my routines.
For anyone else looking to integrate Sonoff Tasmota with Home Assistant, I’d recommend double-checking your MQTT configuration and ensuring your firmware is up to date. It’s a fantastic way to add smart functionality to your home without breaking the bank!
Happy tinkering! ![]()