Last active
January 9, 2022 21:22
-
-
Save kristofer84/c0befb0c1fe30adf9e52d950f4643474 to your computer and use it in GitHub Desktop.
This file contains 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: Generic trigger template (one trigger) | |
description: Turn one or more devices on/off based on a trigger | |
domain: automation | |
input: | |
trigger_device: | |
name: Trigger | |
description: The trigger that will alter the state of the devices. | |
selector: | |
entity: | |
target_device: | |
name: Devices | |
description: The devices to keep in sync. | |
selector: | |
target: | |
trigger: | |
- platform: state | |
entity_id: !input trigger_device | |
action: | |
- service: > | |
{% if trigger.to_state.state == "on" %} | |
homeassistant.turn_on | |
{% else %} | |
homeassistant.turn_off | |
{% endif %} | |
target: !input target_device |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment