Setting up Master Switch using Two Switches

Hi, I’m interested in setting up two switches when pressed at the same time to trigger a turn off all light and power switches automation.

Does anyone have any idea how I can input them into the trigger? Thanks.

Put both as triggers and both as condition.
That should require both to be pushed to do the actions.

I’m curious to why you want to push two buttons at the same time for all lights to go off.
Seems like hard work…

Wanted to push two lights cause I have those two switches at the main entrance and didn’t want to add additonal switches. Having been using this function through Xiao Mi integration. But had moved all my switches to MQTT instead for stability. Hence, trying to duplicate the same feature on HASSIO.

As for condition i can’t seems to do a “press” detection, i could only select “turn on” or “turn off”. In that case, if one of my like is already on, it won’t not trigger since the condition aren’t met. Trying to look for a “click” or “press” both buttons at same time to be the trigger or condition.

Where are you doing this configuration?
Automations.yaml?

I’m doing it in the automation editor. When i press save, there no reaction and nothing gets saved.

automation: !include automations.yaml was already included in my config.

I have no clue what you are doing.

In short, I just need my two switches to function for me to trigger for all my lights to turn off. That’s all.

Button A + Button B acting as master switch to turn off all the lights at home…

I can’t seems to save my automation in the editor. That’s the issue I’m having.

This automation will be difficult to manage if you don’t have the ability to detect presses. Your only recourse would be to base it off the on/off state changes. Also, you’d have to weed out feedback loops because you’re turning all the lights on at the same time, which would trigger the event again.

I believe my switches does detects “clicks” through mqtt as that was an option for me to select as the trigger. Also my switches does provide feedback to determine if all switches are in off/on state cause it is connected with neutral wire.

I guess it’s left with the automation set up in hassio for now. I can’t seems to get it to save. I saw a few mentioned that it is a bug. But no one seems mention any solution.

If you did not create a valid automation, the automation editor does not let you save it. That is not a bug, that is a feature.

That’s strange, cause I tried creating the another automation that I already have on switch A and functioning. Then I dulplicated it for switch B, it still didn’t allow me to save even though it is a valid one.

To further add, I tried making a simple automation to test the saving. “device A turned on as trigger, device B to turn on as action”. That can’t be saved as well. So I don’t think this “feature” is working as you mentioned.

It sounds as there is something wrong with this mystical B.
We still don’t have enough information to clearly help you.
You have not yet shown us anything so you can only get guesses and hints.

Maybe if you are able to point me to the info that you need that would help for me to know what infomation to provide? Cause I’m not sure what’s causing this problem too.

I have already mentioned what I need and the information that is required for you to understand. Unless you don’t understand what was mentioned above.

  1. As mentioned above, Setting two buttons, to function as a master switch to turn all lights off.

  2. As mentioned above as well, I have tried setting triggers using the built-in automation editor in a few scenarios.

Scenario A
Added TRIGGER Device A to have double button click, with ACTION to be getting all device to turn off lights.

  • I was unable to press save.

Scenario B - To test if erroneous input was the cause to stop it from saving
Added Trigger Light A to turn on, with Action Light B to turn on.

  • I was still unable to press save.

There were no extra triggers or action added that was empty.

What device is device A ? What device is device B ?
Maybe post a screenshot of your automation. You must be doing something wrong if you can’t save.

Oh alright!

Device A and B are both wall switches.

I tried inputting both with time and without time it does save.


I also tried to select “both click” it also does not save.

I see something strange in the screenshots.

Example :

Under trigger, your device shows ‘Back and Dining lights’, but trigger shows ‘Dining Lights turned on’
That is not normal behavior, and makes me suspect you entered the name under device manually (changing Dining Lights in Back and Dining Lights)
That would explain why you can’t save, if HA does not know a device with the name ‘Back and Dining Lights’

Oh that is a double rocker switch. I name it back and dining cause there are two switches in one. In my hassio, it detects two switches. So in my trigger I have options of back light on and off, dining light on and off.

Even when I change the switch to a single switch for example room light. It’s the same issue too

These are the options in my list for single and double rocker switch. even i put in the single one i can’t save too.