-
-
Notifications
You must be signed in to change notification settings - Fork 495
Expand file tree
/
Copy pathmaster_bath_accents.yaml
More file actions
executable file
·42 lines (39 loc) · 1.54 KB
/
master_bath_accents.yaml
File metadata and controls
executable file
·42 lines (39 loc) · 1.54 KB
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
#####################################################################################
### When we get out of bed at night, turn on the accent lights in the bathroom
## and then turn off the lights when we are back in bed.
## Also turn on the lights sunset comes. (but only if we are home)
### connected to [Etekcity Outlets](https://amzn.to/2efNoBP)
## [433Mhz Transmitter and receiver](https://amzn.to/2dceNY2)
#####################################################################################
- alias: Bedtime Accent Light
id: 08fe7b86-7610-420a-8f4c-7adb86618900
trigger:
- platform: state
entity_id:
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
to: 'off'
- platform: state
entity_id: sun.sun
to: 'below_horizon'
from: 'above_horizon'
- platform: state
entity_id: group.family
from: 'not_home'
to: 'home'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: group.family
state: 'home'
action:
- service: switch.turn_on
entity_id: switch.master_bathroom_accent_1
- wait_template: >-
{{ not is_state('binary_sensor.sleepnumber_carlo_stacey_is_in_bed', 'off') or is_state('person.stacey', 'not_home')}}
- wait_template: >-
{{ not is_state('binary_sensor.sleepnumber_carlo_carlo_is_in_bed', 'off') or is_state('person.carlo', 'not_home') }}
- service: switch.turn_off
entity_id: group.master_bathroom_accents