Skip to content

Instantly share code, notes, and snippets.

@mostlychris
Created December 18, 2020 16:55
Show Gist options
  • Save mostlychris/324fbb7cf7e147326df3f14c6816caeb to your computer and use it in GitHub Desktop.
Save mostlychris/324fbb7cf7e147326df3f14c6816caeb to your computer and use it in GitHub Desktop.
Turn on light demo
blueprint:
name: Turn On Light Door Opened
description: Tutorial on blueprints
domain: automation
input:
door:
name: Entry Door
selector:
entity:
domain: binary_sensor
device_class: opening
target_switch:
name: Light
description: The light(s) that will be turned on
selector:
target:
entity:
domain: switch
trigger:
platform: state
entity_id: !input door
from: 'off'
to: 'on'
action:
service: switch.turn_on
entity_id: !input target_switch
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment