Associate switches to mirror each other. Replicate a 3way switch setup

I’m slowly migrating from Vera to HA and i’m having trouble with replicating a setup that I had in vera but can’t quite to seem to replicate.

I have HA running via the AIO script on a RPI3 with a Aeon Labs Gen 5 Zstick.

Three switches working in a three way hardwired configuration. The way these switches work is one does the switching and the other two send commands to the main switch. In vera these were associated or grouped to communicate directly instead of going via the hub.

There probably is a standard way to handle this type of thing but I’ve not been able to locate samples enough to get me something working.

I would like all three switches to mirror each other. So switching one gives you the same switch in the other two.

So I created a group:

group:
  entry_switches:
    entities:
      - light.evolve_guest_controls_ltm5_wall_switch_transmitter_level_17_0
      - switch.evolve_guest_controls_ltm5_wall_switch_transmitter_switch_17_0
      - switch.fr_entry_switch_16_0

And then tried to create an automation to keep the group in sync:

automation 5:
  - alias: Turn on the entry lights when one of the relays is turned on
    trigger:
      platform: state
      entity_id: group.entry_switches
      state: 'on'
    action:
      - service: homeassistant.turn_on
        entity_id: group.entry_switches

automation 6:
  - alias: Turn on the entry lights when one of the relays is turned on
    trigger:
      platform: state
      entity_id: group.entry_switches
      state: 'off'
    action:
      - service: homeassistant.turn_off
        entity_id: group.entry_switches

This doesn’t seem to be working all that well and I’m not sure if I’m even on the right track with this? Like I said I’m still new to HA, but I am pretty familiar with linux and making changes via config files in general.

Any advice anyone can provide to point me in the right direction would be very helpful, again what I’m really trying to replicate is a 3 way switch operation but two of the switches just send commands to the main switch.

Thanks!

If one item in a group is “on”, the group will be as well. It will only be “off” if they are all off.

entity_id can accept a list - that’s prob what you want here.

trigger:
  platform: state
  state: 'on'
  entity_id: 
    - light.evolve_guest_controls_ltm5_wall_switch_transmitter_level_17_0
    - switch.evolve_guest_controls_ltm5_wall_switch_transmitter_switch_17_0
    - switch.fr_entry_switch_16_0

That’ll trigger whenever the state of one of those switches changes.

1 Like

If the switches still control each other like they were doing in Vera, just hide the slave switches from the ui.

1 Like

Thank you for the info, I’ll make these changes and see if this helps.

Not sure if it is because I didn’t do the association correctly or what, but the switches do not control each other anymore.

I tried to figure out a way to make a similar association in OZCP but didn’t find any documentation on that, or enough info to figure it out, which is what lead me to look at grouping them together.

I still advise you to make direct association for the switches. This way they will work even if your HA instance is down.

In any case you can still hide the slave switches, and make automation that will toggle the main switch when slaves are toggled.

1 Like

I fully agree that making associations directly from the switches to each other is the best way. Unfortunately I’ve had no luck finding information on how to set that up via HA or OZWCP. If you have info to point me in the right direction I’d be happy to research and see if I can get it setup.

At this point though the SO is getting upset that we can’t turn the lights on at the top of the stairs when we are leaving the house, so getting something working is my top priority.

Thanks again for the info!

Try something like

automation 5:
      - alias: Turn on the entry lights when one of the relays is turned on
        trigger:
          platform: state
          entity_id: group.entry_switches
          state: 'on'
        action:
          - service: homeassistant.turn_on
            entity_id:
              - light.evolve_guest_controls_ltm5_wall_switch_transmitter_level_17_0
              - switch.evolve_guest_controls_ltm5_wall_switch_transmitter_switch_17_0
              - switch.fr_entry_switch_16_0

automation 6:
  - alias: Turn on the entry lights when one of the relays is turned on
    trigger:
      - platform: state
        entity_id: switch.fr_entry_switch_16_0
        state: 'off'
      - platform: state
        entity_id: switch.evolve_guest_controls_ltm5_wall_switch_transmitter_switch_17_0
        state: 'off'
      - platform: state
        entity_id: light.evolve_guest_controls_ltm5_wall_switch_transmitter_level_17_0
        state: 'off'
    action:
      - service: homeassistant.turn_off
        entity_id:
          - light.evolve_guest_controls_ltm5_wall_switch_transmitter_level_17_0
          - switch.evolve_guest_controls_ltm5_wall_switch_transmitter_switch_17_0
          - switch.fr_entry_switch_16_0
1 Like

You also might be able to accomplish the whole thing with one automation as well with something like this

automation:
  alias: Turn on/off the entry lights when one of the relays/light is turned on/off
  trigger:
    platform: state
    entity_id:
      - switch.fr_entry_switch_16_0
      - switch.evolve_guest_controls_ltm5_wall_switch_transmitter_switch_17_0
      - light.evolve_guest_controls_ltm5_wall_switch_transmitter_level_17_0
  action:
    service_template: >
      {% if trigger.to_state.state == "on" %}
      homeassistant.turn_on
      {% elif trigger.to_state.state == "off" %}
      homeassistant.turn_off
      {% endif %}
    entity_id:
      - switch.fr_entry_switch_16_0
      - switch.evolve_guest_controls_ltm5_wall_switch_transmitter_switch_17_0
      - light.evolve_guest_controls_ltm5_wall_switch_transmitter_level_17_0
5 Likes

Slightly off topic here, but what type of switches are you using?

1 Like

To set associations in OZWCP

  • Initialize the controller
  • Select the device in the list
  • In “Functions” select “Group”
  • Pick group number on the left and value(s) on the right.
2 Likes

They Are Evolve brand switches.

I thought I had gotten 1 switch and 2 accessory switches. Turns out I got 3 different models of the switches, but they are all evolve.

So I tried this but oddly (I thought it was odd) that only one of the switches shows anything under group, wouldn’t they all need to be set to the same group for the grouping to work?

I’ll be replacing one of the switches and have on order the same model (hopefully that is what I actually get) switch that has the ability to group. That would leave only the main switch without an option to group while the two accessory switches have the option to group.

  • Evolve Guest Controls LSM-15
  • Evolve Guest Controls LTM-5 (has group option, also what model I ordered)
  • Evolve Guest Controls LTM-5w went bad on me, another one on the way to replace.

I really liked this automation, my first experience with templates.

When I implemented turning on worked great, turning off sent the light turning on and off randomly but rapidly.

Shortly after I learned one of the switches stopped working, so I’ve ordered another one, but wanted to check to make sure that the configuration wouldn’t have been setup to create a trigger loop or something where the lights keep turning each other off and on endlessly?

Once I get the new switch installed I’m planning to try this again (hopefully tomorrow) so I’d love any insight as to why that might have happened, very well could have been the death rattle of the switch, but want to make sure in case it actually burned up the switch or something LOL.

Honestly I’m not sure if this would cause a trigger loop. It’s quite possible. If the switch that is broke still reports the correct status but just doesn’t actually function, you could trouble shoot the issue before installing the new one. If I were troubleshooting this I would stop HA from the command line and start it manually so I could view all the actions HA is doing. You would then be able to see if HA was looping and repeatedly triggering the automation. I’ve never used that template in this way so I can’t say for certain if it would be causing the issue.

1 Like

I was reading up on these a little and to be honest, I’m somewhat excited about these. Sounds like these don’t require a neutral at the secondary switches (the LTM5). It also sounds like evolve has their own proprietary communication protocol for talking between each other. I wonder if grouping the switches is the right thing to do. I wonder if turning on the group is causing all three of them to try to turn on or something. I have contacted their support team to see if my understanding of not needing the neutral at the LTM5’s are correct. If it is, I’ll be installing some of these really quick. Great Find!!!

1 Like

I have them hooked up without a neutral connection. Because they just communicate with the main switch they only need power to stay operating, they don’t do any of the switching themselves. So white black and green are all hooked up in the box, the yellow wire from the switch is capped off and not used.

I’ll be interested to see if the new switch has the same group options that the other switch of similar model number has in OZW. I have the switch now, plan to install later today, so i’ll report back.

Well the switch is fully broken I can’t get it to respond to anything at this point. Tried to unpair and repair it, it won’t respond at all. I may try to do the HA startup as you suggest just to see if anything comes across, but I’m doubtful since it has been such a dead fish.

I have the new one now, so i’ll test a bit and then swap it out.

Thanks again for your help!

Let me know how you get along. Fingers crossed it was just a bum switch. I’m working my system today as well so It’d be great to hear your results when you make some progress.

1 Like

Sorry for the few days delay in getting back to this. I had a lot of trouble with the new switch until I finally figured out how to do the group/association in OZW then things have been great.

First, the thing that had me confused about grouping was that the main switch doesn’t need any grouping/associations. I thought I might have to replace my main switch as well since it didn’t have the option to group and I thought it might also be failing. Also when I looked at the group options on the accessory switches there was just a random list of numbers which didn’t make sense to me until I realized they were the ID’s of the devices in OZW. So all I had to do was find the main switch, see that it is device ID 19 and add the other two accessory switches with group set to 19. Now, as they had done before I moved over to HA, the two add on switches directly control the main switch.

The problem with the Evolve LTM-5 was that physically pressing the switch did nothing. It didn’t trigger any changes in the HA UI. The only indication I had that something had happened was in the logs where I saw things like:

Jan 16 10:39:24 ha hass[16897]: INFO:homeassistant.core:Bus:Handling <Event zwave.node_event[L]: object_id=tos_entry_24, basic_level=255>

In the daemon.log log file. This is for a switch “on” event for an “off” event the basic_level is 0. So there was some communication taking place and I had started to look into using a template to translate those 255 & 0 values to on and off, but they I figured out the association part.

The automation that @Kbeesnees suggested with the template bits worked great, if I was controlling the switch from the interface. It kept all the 3 switches in the same state. If things had worked in the physical world it would have been perfect. But I do think the group/association is the best way to go, more resilient to HA being wonky and breaking the lights. So now i’ll hide the accessory switches in HA and only use the main switch for my automations and things should work perfectly. knock on wood

Thanks everyone for the help, I’ve got a few more automations that I want to setup that I think might be tricky so i’ll be posting again soon. This HA stuff is like an addiction, hard to stop tweaking once you realize some of the cool stuff you can do.

Edit: For clarity.