Created
February 13, 2025 15:41
-
-
Save devjourney/eec376f86b5947cc9650132792403ab6 to your computer and use it in GitHub Desktop.
A Home Assistant automation to have several switches follow the on-off state of another switch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: Office Lights - Follow Moulding Lights | |
triggers: | |
- entity_id: | |
- switch.ofc_moulding_lights | |
from: "on" | |
to: "off" | |
trigger: state | |
- entity_id: | |
- switch.ofc_moulding_lights | |
from: "off" | |
to: "on" | |
trigger: state | |
actions: | |
- target: | |
entity_id: | |
- switch.ofc_power_strip_ofc_floor_lamp | |
- switch.ofc_power_strip_ofc_led_switch | |
- switch.ofc_desk_leds | |
action: switch.turn_{{ trigger.to_state.state }} | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment