Last active
December 4, 2022 06:08
-
-
Save ryankshaw/cddc29dec8b37ddac58161646ed8c433 to your computer and use it in GitHub Desktop.
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
blueprint: | |
name: Lamp Follows Swicth | |
description: Turn on or aff a lamp every time a switch state changes | |
domain: switch | |
input: | |
master_switch: | |
name: the Master Switch | |
description: This sensor will be synchronized with the light. | |
selector: | |
entity: | |
domain: switch | |
target_light: | |
name: follower | |
description: The lights to keep in sync. | |
selector: | |
target: | |
entity: | |
domain: switch | |
trigger: | |
- platform: state | |
entity_id: !input master_switch | |
action: | |
- service: > | |
{% if trigger.to_state.state == "on" %} | |
light.turn_on | |
{% else %} | |
light.turn_off | |
{% endif %} | |
target: !input target_light |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment