51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
- id: bathroom-motion-day
|
|
alias: '[Bathroom] Motion Day'
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.bathroom_motion_occupancy
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_select.home_mode
|
|
state: Day
|
|
action:
|
|
- service: light.turn_on
|
|
entity_id: light.bathroom_lights
|
|
data:
|
|
brightness_pct: 100
|
|
kelvin: 3200
|
|
- id: bathroom-motion-night
|
|
alias: '[Bathroom] Motion Night'
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.bathroom_motion_occupancy
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_select.home_mode
|
|
state: Night
|
|
action:
|
|
- service: light.turn_on
|
|
entity_id: light.bathroom_lights
|
|
data:
|
|
brightness_pct: 5
|
|
kelvin: 2700
|
|
- id: bathroom-motion-off
|
|
alias: '[Bathroom] Motion Off'
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.bathroom_motion_occupancy
|
|
for: '0:05:00'
|
|
from: 'on'
|
|
to: 'off'
|
|
action:
|
|
- service: light.turn_off
|
|
entity_id:
|
|
- light.bathroom_lights
|
|
- light.bathroom_mirror_lights
|