Hi,
I got a sweet deal on a pack of Sonoff Wall Plates (T0US2C) which goes inside the single gang but have two buttons. So here is the configuration of my house:
- Current wall switch that operates the outside light that is mounted right above the garage side door that opens into the outside lawn (door1, wallplate(1))
- Current wall switch that operates the outside light that is mounted right above the sliding door that opens into the outside lawn (door2, wall plate2)).
- Mounted outside are three additional LED flashlights(not the ones mentioned in 1 & 2) that are connected to HA via three Sonoff Basic (light-1, light-2, light-3)
I’ll be replacing wall plates from 1) and 2) above with the Sonoff Wall plates so that I’ve updated options as follows:
wallplate(1) ⇒ wallplate-1 (switch-1, switch-2), connect wallplate-1(switch-1) to the outside light and it will operate as the current manual switch
wallplate(2) ⇒ wallplate-2 (switch-1, switch-2), connect wallplate-2(switch-2) to the outside light and it will operate as the current manual switch
The wallplate-1(switch-2) and wallplate-2(switch-2) have following characteristics:
- Both buttons are free and have no electrical utility as there is no electrical load attached to it
- Both are connected to HA via Wifi and can be used as buttons to trigger events which can be utilized in automation for a logical 2-way switch for operating light-1, light-2 and light-3 that are not even connected to either of these wallplates.
So here is the logical switch setup in my mind:
- When either wallplate-1(switch-2) or wallplate-2(switch-2) are pressed the first time then turn ON light-1, light-2 & light-3
- When either wallplate-1(switch-2) or wallplate-2(switch-2) are pressed the second time then turn OFF light-1, light-2 & light-3
For the automation, I can use some help from this forum to incorporate few additional logic:
- When a single person leaves from door-1 after turning ON the lights but returns from door-2 then the same person can turn OFF the lights by pressing wallplate-2(switch-2). This is easy and the simplest scenario.
- But if there are two persons, person-1 leaves from door-1 after turning ON the outside lights. Then we would not want person-2 (leaving from door-2) to accidentally turn OFF the lights on person-1 when wallplate2(switch-2) is pressed by person-2 the first time. So the automation needs to check if the light-1, light-2 and light-3 are running then DO NOTHING when wallplate2(switch-2) is pressed the first time but turn OFF light-1, light-2 and light-3 when wallplate2(switch-2) is pressed the second time. The same logic would apply when wallplate-1(switch-2) and wallplate-2(switch-2) are interchanged in the scenario above. And I do not want to get into the complication of tracking person(s) so the logic of this step should work for the single person scenario if that person presses the wallswitch twice.
Essentially the above logic is creating a virtual 2-way electrical switch between lights which normally at home are hardwired in large spaces like living rooms or multi-tiered locations like staircases.
Any pointers would be appreciated.
Thanks.