Skip to content

Instantly share code, notes, and snippets.

@mostlychris
Last active December 17, 2020 22:11
Show Gist options
  • Save mostlychris/935dda42b6e47e67456a9d2effb27988 to your computer and use it in GitHub Desktop.
Save mostlychris/935dda42b6e47e67456a9d2effb27988 to your computer and use it in GitHub Desktop.
Turn on Light(s) When Door Opened
blueprint:
name: Turn on lights when door is opened
description: Turn on lights when door is opened
domain: automation
input:
door:
name: Entry Door
selector:
entity:
domain: binary_sensor
device_class: opening
target_switch:
name: Lights
description: The light(s) that will be turned on
selector:
target:
entity:
domain: switch
trigger:
platform: state
entity_id: !input door
action:
service: switch.turn_on
target: !input target_switch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment