Sonoff Light Switch T1 3C Model (3 gang)

I want to configure my sonoff t1 3c light switch with home assistant. I have its ip and mac address. From what I understand I have to do it via mqtt broker, correct?

I already connected the light switch to the iphone ewelink app and it works great thru there.

I found this post:

So I added this code:

light:
    platform: mqtt
    name: "MasterBedroom"
    state_topic: "stat/sonoff/POWER1"
    command_topic: "cmnd/sonoff/POWER1"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: false

but how does homeassistant know the IP of my t1 switch?

mqtt doesn’t care about IP addresses. It uses topics.

Using the eWeLink app - that is not MQTT.
You need to either flash with Tasmota or there is a custom component you can use.

What do you mean by “there is a custom component I can use”?

You already found it cos you posted in that thread already…

Ok so do you mean peterbugas github?

yes. that’s pretty much the only way to use Sonoffs if you don’t want to flash with Tasmota or Esphome

If I flash then the device loses cloud functions such as Google Home connectivity, right?

Nope. They can be integrated with Google Home via the Google Assistant Integration or HA Cloud. You won’t be able to use the Ewelink app anymore though.

It is also possible to use IFTTT with webhooks etc to integrate with Home Assistant. (I did this before there was a Google Assistant Integration)

You’re likely going to need to set up an integration with Google Assistant anyway for other devices…

The majority of people (I think) would flash with Tasmota though…

1 Like

Ok ill keep looking into the peterbugas component. Ive installed the folders and files and restarted HA but the switch doesnt show up.

Thanks

If you want a nice easy way to flash your Sonoff look at https://github.com/ct-Open-Source/tuya-convert as you don’t need to open the device up. Or buy a programmer.