I have 2 rooms, from which a wall was taken down so it is now 1 room. Each room had one light that is operated by wall switches. I installed 1 tasmota sonoff device in each wall box and hooked up the gpio14 wires to the actual switch. What I am trying to do, is when one switch is turned on, the other one turns on, same with being turned off. I have it working for the most part, but sometime if you hit the switch just right and it click on and off again quickly the state of one light triggers a automaton and then I get a nice strobe light on off affect from both lights. Basically one action of one automation is triggering the other automation, and they go back and forth. I hope that makes sense. Is there something I can do to to my automation, so that will not do that? I am somewhat new and still learning how to do automation. Below is what I currently have.
- alias: Kitchen Light ON
trigger:
- entity_id: switch.kitchen_light_switch
from: 'off'
platform: state
to: 'on'
- entity_id: switch.kitchen_light_switch_2
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
entity_id: switch.kitchen_light_switch
service: switch.turn_on
- data:
entity_id: switch.kitchen_light_switch_2
service: switch.turn_on
- alias: Kitchen Light OFF
trigger:
- entity_id: switch.kitchen_light_switch
from: 'on'
platform: state
to: 'off'
- entity_id: switch.kitchen_light_switch_2
from: 'on'
platform: state
to: 'off'
condition: []
action:
- data:
entity_id: switch.kitchen_light_switch
service: switch.turn_off
- data:
entity_id: switch.kitchen_light_switch_2
service: switch.turn_off