1e554cc0df
change light.toggle to light.turn_on
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
- id: hallway-lightstrip-on
|
|
alias: '[Hallway] Lights strip on'
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.hallway_motion_sensor
|
|
from: 'off'
|
|
to: 'on'
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.home_mode
|
|
state: Day
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.sleep_mode
|
|
state: 'on'
|
|
sequence:
|
|
- service: light.turn_on
|
|
entity_id: light.hallway_lightstrip
|
|
data:
|
|
brightness_pct: 100
|
|
kelvin: 2000
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.sleep_mode
|
|
state: 'off'
|
|
sequence:
|
|
- service: light.turn_on
|
|
entity_id: light.hallway_lightstrip
|
|
data:
|
|
brightness_pct: 100
|
|
kelvin: 3200
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.home_mode
|
|
state: Night
|
|
sequence:
|
|
- service: light.turn_on
|
|
entity_id: light.hallway_lightstrip
|
|
data:
|
|
brightness_pct: 5
|
|
rgb_color:
|
|
- 255
|
|
- 0
|
|
- 0
|
|
|
|
- id: hallway-motion-off
|
|
alias: '[Hallway] Motion Off'
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.hallway_motion_sensor
|
|
for: '0:02:00'
|
|
from: 'on'
|
|
to: 'off'
|
|
action:
|
|
- service: light.turn_off
|
|
entity_id: light.hallway_lightstrip
|