1
0
ansible-home-assistant/scripts/90.lights-hallway.yaml
Przemek Grondek 2796eb441d Update hallway light automation
set lower brightness during sleep mode
  set higher brightness for lightstrip during night
2022-04-21 00:45:56 +02:00

66 lines
1.9 KiB
YAML

hallway_lights_toggle:
alias: '[Hallway] Lights toggle'
sequence:
- choose:
- conditions:
- condition: state
entity_id: light.hallway_light
state: 'on'
sequence:
- service: script.hallway_lights_off
- conditions:
- condition: state
entity_id: light.hallway_light
state: 'off'
sequence:
- service: script.hallway_lights_on
hallway_lights_off:
alias: '[Hallway] Lights off'
sequence:
- service: light.turn_off
entity_id: light.hallway_light
- service: light.turn_off
entity_id: light.hallway_lightstrip
hallway_lights_on:
alias: '[Hallway] Lights on'
sequence:
- 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_light
data:
brightness: 128
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.hallway_light
data:
brightness: 255
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
entity_id: light.hallway_lightstrip
data:
brightness_pct: 20
hs_color:
- 360
- 100