mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-20 04:04:06 +00:00
Massive Migration! #292
This commit is contained in:
41
automation/master_bath_accents.yaml
Executable file
41
automation/master_bath_accents.yaml
Executable file
@@ -0,0 +1,41 @@
|
||||
#####################################################################################
|
||||
### 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](http://amzn.to/2efNoBP)
|
||||
## [433Mhz Transmitter and receiver](http://amzn.to/2dceNY2)
|
||||
#####################################################################################
|
||||
|
||||
- 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
|
||||
entity_id: switch.master_bathroom_accents
|
||||
- wait_template: >-
|
||||
{{ not is_state('binary_sensor.sleepnumber_carlo_stacey_is_in_bed', 'off') }}
|
||||
- wait_template: >-
|
||||
{{ not is_state('binary_sensor.sleepnumber_carlo_carlo_is_in_bed', 'off') }}
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.master_bathroom_accents
|
Reference in New Issue
Block a user