2018-01-02 00:00:45 +00:00
|
|
|
#####################################################################################
|
|
|
|
### 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)
|
2020-07-02 18:50:39 +00:00
|
|
|
### connected to [Etekcity Outlets](https://amzn.to/2efNoBP)
|
|
|
|
## [433Mhz Transmitter and receiver](https://amzn.to/2dceNY2)
|
2018-01-02 00:00:45 +00:00
|
|
|
#####################################################################################
|
|
|
|
|
|
|
|
- alias: Bedtime Accent Light
|
|
|
|
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
|
2019-08-27 14:51:17 +00:00
|
|
|
entity_id: switch.master_bathroom_accent_1
|
2018-01-02 00:00:45 +00:00
|
|
|
- wait_template: >-
|
2018-04-15 15:13:49 +00:00
|
|
|
{{ not is_state('binary_sensor.sleepnumber_carlo_stacey_is_in_bed', 'off') or is_state('device_tracker.stacey', 'not_home')}}
|
2018-01-02 00:00:45 +00:00
|
|
|
- wait_template: >-
|
2018-04-15 15:13:49 +00:00
|
|
|
{{ not is_state('binary_sensor.sleepnumber_carlo_carlo_is_in_bed', 'off') or is_state('device_tracker.carlo', 'not_home') }}
|
2018-01-02 00:00:45 +00:00
|
|
|
- service: switch.turn_off
|
2019-08-17 19:18:36 +00:00
|
|
|
entity_id: group.master_bathroom_accents
|