-
Notifications
You must be signed in to change notification settings - Fork 185
/
alarm_clock.yaml
executable file
·30 lines (30 loc) · 1.03 KB
/
alarm_clock.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
#-
# _ _ _
# __ _| | __ _ _ __ _ __ ___ ___| | ___ ___| | __
# / _` | |/ _` | '__| '_ ` _ \ / __| |/ _ \ / __| |/ /
# | (_| | | (_| | | | | | | | | | (__| | (_) | (__| <
# \__,_|_|\__,_|_| |_| |_| |_|___\___|_|\___/ \___|_|\_\
# |_____|
#
#- from github.com/basnijholt/home-assistant-config
- alias: "Alarm clock: wake up with Spotify and light"
trigger:
platform: template
value_template: >
{{ states("sensor.time")[0:5] == states("sensor.ten_minutes_before_alarm") }}
condition:
condition: state
entity_id: input_boolean.alarm_clock
state: "on"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.alarm_clock
- service: input_boolean.turn_on
entity_id: input_boolean.wake_up_with_spotify
- service: input_boolean.turn_on
entity_id: input_boolean.wake_up_light
- service: input_select.select_option
entity_id: input_select.sleep_mode
data:
option: "off"