Last active
January 3, 2022 11:33
-
-
Save jswetzen/0cd570fa043320fd79fc5503bc63e1a4 to your computer and use it in GitHub Desktop.
Home assistant switch based on binary sensor
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: Control with sensor | |
description: 'Set the state based on a binary sensor' | |
domain: automation | |
input: | |
controller: | |
name: First entity | |
selector: | |
entity: | |
controllee: | |
name: Second entity | |
selector: | |
entity: | |
mode: restart | |
max_exceeded: silent | |
variables: | |
controller: !input 'controller' | |
controllee: !input 'controllee' | |
trigger: | |
- platform: state | |
entity_id: !input 'controller' | |
action: | |
- service: homeassistant.turn_{{ trigger.to_state.state }} | |
data: | |
entity_id: '{{ controllee }}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment