Hello. I’m a newbie in this world and am seeking your smart guidance! I have a treatlife 3-way smart switch which I flashed with Tasmota and hooked up to Home Assistant. All works fine with manual switch in terms of turning on and off. Problem is that if I turn on lights with Smart switch and turn off with manual switch it still shows as “on” in HA. Is there any way to detect lights are off and toggle HA switch to off? TIA
not without putting some other kind of sensor directly on the light itself.
Thanks for your response. Is there such sensor I could add to the bulb itself? Now that you said that, maybe, a better option for one of my use cases is to use smart bulb as they are regular E26 (2x) and group them. I have others but they are recessed leds and I’m not sure there is a smart version of it.
I don’t understand
From what I read :
- You have a smart switch (flashed with tasmota) that turns the light off/on
- You have another manual switch what turns the same light on/off
When you use the manual switch, you don’t see a status update in HA, but when you use the smart switch you do ?
that is correct. this is a 3 way switch, meaning 2 switches controlling the same light set (e.g.: stairs light where there is one downstairs and one upstairs). One of the switches I replaced with a treatlife “tasmotized”. The other switch remained the manual switch. If I turn light set on with smart switch it shows as “ON” in HA, however, if I turn lights “OFF” using the manual switch, state is still “ON” in HA.
That has to do with the way you wired your switches. My whole house is full off “3 way” switches (I always find it funny why the US call 2 switches that control 1 (group of) lights 3 way ). All shellies or sonoff mini’s running tasmota, 1 per (group off) lights, multiple switches. No issues with HA because each switch is controlled by any ‘dumb’ manual switch. Whatever switch I press, the shelly or sonoff mini notice and gives the status to HA (and toggles the light of course).
Thanks Francisp. Yeah, it is pretty funny the way the “3 way” switch is called if there is only 2 in the configuration. There is also a “4 way” that has only 3 switches of course…lol.
Seems its time for me to learn more about shellies/sonoffs. Do you have a good tutorial you followed for automating the “3 way” switches?
For automating, if everything is wired correctly, it does not matter if you have 1-way, 3-way or n-way switches.
For example:
- my son’s bedroom : 1-way ( 1 switch at the door, 1 light)
- my bedroom : 4-way (1 switch at the door, 1 switch each side of the bed, 1 light)
- my staircase/corridor/staircase : n-way ( 10 switches, 3 lights not separately controllable)
They show all/each up as 1 light in HA, and are automated as 1 light
Hello! After a few weeks my shelly arrived and I installed on a regular switch (non 3-way) to test/learn. I got it working as expected after changing button action to edge. Now, how do I get the switch added to Home Assistant? I tried using the mqtt option but still doesn’t show up in hass. Thanks!!
I actually found that for some reason I had to connect the shelly on the same vlan as the hass/mosquitto. Not sure why, but on the vlan I have for the IoT stuff didn’t work (although I have all my tasmotized treatlifes connected to that vlan and communicating with hass via mqtt server). Problem now is that after adding it to hass I tried to change the MQTT prefix and I cannot find it any longer in hass… seems it “got lost” somewhere. I can actually see it on mosquitto’s log (below) but cannot find it on “Unused entities”. Any help is appreciated.
1589201445: New connection from 192.168.1.120 on port 1883.
1589201445: New client connected from 192.168.1.120 as shelly1-B90278 (p2, c1, k60, u’user’).
how did you flash the treatlife 3way switch with tasmota? Just got mine and trying to use Tuya-Convert but it stops after it connects to the raspberry pi ap. It worked great with all the other treatlife switches i have just not these 3 way.
Hi @Carlos_AP, how did you flash the treatlife 3 way switch? I’m having an issue with tuya convert, the switch stops the paring mode right after I start the flashing process
@Antasp3136 and @kakareo, I have the Treatlife SS01 3-Way Switch and could not get tuya convert to work on these, I could never get them into flash mode. I had to open them up, solder some connections and manually flash them. It was painful and unexpected as every other Treatlife switch type I have has been able to be flashed with tuya convert. Hope this helps!
@carlson4 @Antasp3136 @kakareo That’s weird. I did get them flashed just like any other… put on pairing mode and use the tuya-convert util to do the magic. I struggled, however, with making it work and ended giving up, however, after a little bit more research I found this tutorial Digiblur which helped me a LOT! I bought a Moes 3-way and it worked like a charm. Same with my treatlife switches. https://www.digiblur.com/2019/01/true-3-way-smart-switch-w-tasmota-no.html
Hope this helps.
@Carlos_AP awesome, thanks for the head up on the video, ill check it out.
Also to note, I have the older model 3 ways with the square light at the bottom, not the new model with the round light more towards the middle, not sure if that effects the firmware and capabilities in any way.
Im also having an issue with the three way switch allowing enough power through the lines that it keeps my led light fixture just barely lit up even when in the off position. I have tried multiple 3 way switches on the treatlife side, and even changed out the “dummy” light switch that is acting as the 2nd switch and still same result. Not sure if anyone is seeing this same issue or may know why?
Im assuming for whatever reason the 3 way sends some power through even in the off position, enough to power a second smart switch on the other side, and this happens to be enough to illuminate my particular LED dome light fixture, but not sure.
Which TreatLife switch did you use?I just bought some SS02’s and programmed them using the template on blakaddr.com. I put one on a multi-way circuit and everything works fine from the smart and dumb switches but neither the Tasmota GUI nor the HA GUI can reliably tell me whether the light is on.
Which was your opening post!
Hopefully someone has figured this out.
Just FYI, I solved this without any rules and just the following entry:
- platform: mqtt
name: "Basement Stairs"
icon: "mdi:lightbulb"
state_topic: "stat/basement_stairs/POWER1"
state_off: "OFF"
state_on: "ON"
command_topic: "cmnd/basement_stairs/POWER2"
payload_on: "2"
payload_off: "2"
availability_topic: "tele/basement_stairs/LWT"
payload_available: "Online"
payload_not_available: "Offline"
POWER1 tells Home Assistant if the switch is on or off. POWER2 is to switch on or off. However because it is a 3 way switch POWER2 has to be toggled (i.e. payload of 2) just like the second non smart switch is toggled. The only thing that doesn’t work properly is Google Home integration. When you say 'Hey Google turn off all basement lights" it will toggle the 3 way switch even when the light is off and as a result the light actually turns on. To work around this don’t expose the 3 way switch to Google and add a template switch for each 3 way switch just for Google
So do you end up with two icons in the dashboard, one for status and the other for on/off action?
If not, what entity did you use in the dashboard and where does one put this entry?
Thanks
Based on the config shared above I have an entity switch.basement_stairs in Home Assistant and it shows as a regular switch with a single icon
That is great and much simpler than some templates that I’ve been using. The only thing with my method is that I can use different icons for the power states.
Do I put this in configuration.yaml and how do I extend the construct to additional switches? Can I just make copies of this code with different names and topics and add them one after another?
Thanks