/
bedroom_fairy_lights.yaml
48 lines (45 loc) · 1.23 KB
/
bedroom_fairy_lights.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Fairy lights mounted on the headboard in the guest bedroom.
# See also: packages/bedroom_light_alarm.yaml
automation:
- alias: "Fairy Lights - Auto-Off"
id: 4c3b7cbe-c585-4f4f-987c-db16fd814cdd
trigger:
- platform: state
entity_id: light.fairy_lights
to: "on"
for:
hours: 5
minutes: 0
seconds: 0
action:
- service: light.turn_off
entity_id: light.fairy_lights
data:
transition: 5
- alias: Turn on Fairy Lights at bedtime
id: c901fb8b-1858-4533-8dae-96c5f01d15c3
trigger:
- platform: time
at: "22:45"
condition:
- alias: "Room not excluded"
condition: state
entity_id: input_boolean.room_exclude_guest_bedroom
state: "off"
- condition: state
entity_id: light.fairy_lights
state: "off"
- condition: state
entity_id: input_select.home_mode
state: "Home" # Don't run if we're away or asleep.
action:
- service: light.turn_on
entity_id: light.fairy_lights
data:
transition: 5
brightness_pct: 30
homeassistant:
customize:
light.fairy_lights:
friendly_name: Fairy Lights
icon: mdi:bed