Created
July 29, 2018 23:38
-
-
Save smarthomehobby/afeaf09706928918eaff4c3fd89679e8 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
# This part goes in automations.yaml | |
- id: night_living_room | |
alias: Nighttime Living Room | |
trigger: | |
platform: state | |
entity_id: binary_sensor.door_window_sensor_158d0001e59f8e | |
from: 'off' | |
to: 'on' | |
action: | |
service: homeassistant.turn_on | |
entity_id: | |
- script.living_room_night | |
# This part goes in scripts.yaml | |
living_room_night: | |
alias: Living Room Night | |
sequence: | |
- service: homeassistant.turn_on | |
entity_id: light.lamp | |
data: | |
brightness_pct: 15 | |
color_temp: 310 | |
- wait_template: "{{is_state('binary_sensor.door_window_sensor_158d0001e59f8e', 'off')}}" | |
- service: homeassistant.turn_off | |
entity_id: | |
- light.lamp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment