1
0
ansible-home-assistant/scripts/90.lights-hallway.yaml

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: 76
- 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: 60
hs_color:
- 360
- 100