I have a 3 way switch that currently has one Third Reality Smart Switch attached to one end. I would like to attach another smart switch to the other end and link their states such that they reflect on or off as a single unit. In this manner, I could use “on” or “off” in my automation and know the state rather than just use toggle and have to know the state intrinsically. I have looked around a bit, but I am relatively new to Home Assistant so I may not even be asking the right questions.
My philosophy on automation is that it should help, be as transparent as possible and the controlled devices not be rendered useless if (when) the automation fails which is why I have chosen to go with these switches. There are physical buttons on the switch to control it and if all else fails, just take it off the switch and use as normal. Since these smart switches are configurable in that either up or down can represent on, it would look like this:
Either switch A or B on = Light on
Both switch A and B off = Light off
Can this be done and represented by a single light entity? It would not matter which one actually actuates the switch if the state is reflected as such.
I use Zooz smart switches. The switch handles all of this. Only put one in at the main switch location.
The Zooz switch handles this. They are very clear to not install two switches in this scenario. Does the Third Reality not do that? If not, it is really smart?
Oh, a bit of Googling and I see they ain’t smart at all! I imagine this has come up here and more searching might find an answer. Or someone will reply.
Third Reality need to rename their switches. OMG!!!
I appreciate the information, but unless these switches are 3-way and operate when the automation fails, then they violate rule #2 and do not work for me. Additionally, the question is whether I can work with what I have, since I know that replacing switches will work and is rather trivial.
Yes, they are three way. That is the point and it is what you are asking for!
Assuming ‘rule #2’ is My philosophy on automation is that it should help, be as transparent as possible and the controlled devices not be rendered useless if (when) the automation fails which is why I have chosen to go with these switches. There are physical buttons on the switch to control it and if all else fails, just take it off the switch and use as normal.
This is my requirement too as it is important for the WAF (Wife Approval Factor).
What I am using just works even if HA is down. I don’t need to remove anything.
I don’t have any direct experience with the device in question, but assuming you can track the position/state of each actuator, then it should be possible to combine them with a Template Switch or Template Light.
You basically just described the default behaviour for groups in HA. Create a group helper for your switch entities and the above logic will be built in.
Note that this will create a switch group. If you want the group to be represented as light, then you will need to change the entities to lights using switch as X helper first.
I assume you mean “on” as in “toggled in the up position” since these are toggle-bot style actuators and not relays?
In that case you’re missing the third scenario, which is “both switch A and B on (up)” — which for most (all?) three-way wiring scenarios, results in the light OFF.
If this is how your wiring works, be careful using HA switch groups which will incorrectly show ON when both toggles are on (up). Instead you’ll have to create a template switch (or light) which returns the state you want. For example:
state: >-
{% set sw1_up = is_state('switch.toggle1', 'on') %}
{% set sw2_up = is_state('switch.toggle2', 'on') %}
{% if (sw1_up and not sw2_up) %} on
{% elif (sw2_up and not sw1_up) %} on
{% elif (sw1_up and sw2_up %} off
{% elif (not sw1_up and not sw2_up %} off
{% else %} unknown
{% endif %}
Thanks to everyone for the assistance. What I came up with was an input boolean (thanks to [Didgeridrew] for sparking that idea, I haven’t really done much with helpers yet, so I didn’t know it existed) that will turn on or off if either one of the switches is on or off, then I show the state of the helper on the dashboard. That part works.
Now I am working on the ability to toggle the button from the dashboard to toggle one of the switches. While that does toggle the button, it then triggers the automation that changes the other switch which has the effect of turning my switch button into a remote. Nice, but not what I am going for.
I’m not sure whether considering the dashboard button state within this automation as another condition would help or hurt, or if I just set myself up for some circular logic and this should be done a completely different way. Either way, it’s a learning experience.
Both toggles can be up or down to show a state of on or off, this is configurable on the switch itself, so I have one set to be “on” when it is up, and the other to be “on” when it is down.
Providing my resolution to this thread for others. I like one automation per entity, so I broke it down for both switches, even though I could have crammed it all into one. My switch automation (which is identical but for the entity ID) is as follows:
alias: Living Room Switch 1
description: ""
triggers:
- trigger: state
entity_id:
- switch.switch1
from: null
to: null
conditions: []
actions:
- choose:
- conditions:
- condition: and
conditions:
- condition: state
entity_id: switch.switch1
state: "on"
- condition: state
entity_id: switch.switch2
state: "off"
sequence:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.living_room_3_way
- conditions:
- condition: and
conditions:
- condition: state
entity_id: switch.switch1
state: "off"
- condition: state
entity_id: switch.switch2
state: "on"
sequence:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.living_room_3_way
- conditions:
- condition: and
conditions:
- condition: state
entity_id: switch.switch1
state: "off"
- condition: state
entity_id: switch.switch2
state: "off"
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.living_room_3_way
- conditions:
- condition: and
conditions:
- condition: state
entity_id: switch.switch1
state: "on"
- condition: state
entity_id: switch.switch2
state: "on"
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.living_room_3_way
mode: single
My dashboard has an entity that will toggle one of the two switches and, just for fun, my voice assistant will toggle the other switch to spread out the wear so it is not on a single switch.
Thanks to everyone for their responses and ideas, it is truly appreciated.
Perhaps it is, but I don’t learn anything by using someone else’s work. I know how my code works, and the method that has suited me has always been “Make it work now, refine it later.”, except in business where technical debt builds due to time constraints.