Files
zorruno-homeassistant/automations/two_way_light_switching.yaml
T
2025-10-08 19:21:28 +13:00

70 lines
2.3 KiB
YAML

- id: "Two_Way_Lights_-_Garage_Corridor_-_1"
alias: "Two Way Lights - Garage Corridor - 1"
trigger:
- platform: state
entity_id: switch.garage_entry_switch_1
action:
- choose:
- conditions:
- condition: state
entity_id: switch.garage_entry_switch_1
state: "on"
sequence:
- service: switch.turn_on
entity_id: switch.esp_loungesouthleftswitch_relay_2_outside_light_1
default:
- service: switch.turn_off
entity_id: switch.esp_loungesouthleftswitch_relay_2_outside_light_1
- id: "Two_Way_Lights_-_Garage_Corridor_-_2"
alias: "Two Way Lights - Garage Corridor - 2"
trigger:
- platform: state
entity_id: switch.esp_loungesouthleftswitch_relay_2_outside_light_1
action:
- choose:
- conditions:
- condition: state
entity_id: switch.esp_loungesouthleftswitch_relay_2_outside_light_1
state: "on"
sequence:
- service: switch.turn_on
entity_id: switch.garage_entry_switch_1
default:
- service: switch.turn_off
entity_id: switch.garage_entry_switch_1
- id: "Two_Way_Lights_-_Garage_Main_-_1"
alias: "Two Way Lights - Garage Main - 1"
trigger:
- platform: state
entity_id: switch.garage_entry_switch_3
action:
- choose:
- conditions:
- condition: state
entity_id: switch.garage_entry_switch_3
state: "on"
sequence:
- service: switch.turn_on
entity_id: switch.esp_loungesouthleftswitch_relay_2_outside_light_1
default:
- service: switch.turn_off
entity_id: switch.tasmo_sbas_0407_garagelight
- id: "Two_Way_Lights_-_Garage_Main_-_2"
alias: "Two Way Lights - Garage Main - 2"
trigger:
- platform: state
entity_id: switch.tasmo_sbas_0407_garagelight
action:
- choose:
- conditions:
- condition: state
entity_id: switch.tasmo_sbas_0407_garagelight
state: "on"
sequence:
- service: switch.turn_on
entity_id: switch.garage_entry_switch_3
default:
- service: switch.turn_off
entity_id: switch.garage_entry_switch_3