mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-15 17:12:59 +00:00
64 lines
1.7 KiB
YAML
64 lines
1.7 KiB
YAML
automation:
|
|
- alias: Lighting · Hallway · Motion On
|
|
trigger:
|
|
platform: state
|
|
entity_id: group.hallway_motion
|
|
to: "on"
|
|
condition:
|
|
condition: state
|
|
entity_id: binary_sensor.someone_home
|
|
state: "on"
|
|
action:
|
|
- choose:
|
|
# Turn on in Day Mode
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.house_mode
|
|
state: 'day'
|
|
sequence:
|
|
- service: light.turn_on
|
|
entity_id:
|
|
- light.hallway
|
|
- light.browser_hallway
|
|
data:
|
|
brightness_pct: 100
|
|
# Turn off in Night Mode
|
|
default:
|
|
- service: light.turn_on
|
|
entity_id:
|
|
- light.hue_white_1
|
|
- light.hue_1
|
|
- light.browser_hallway
|
|
data:
|
|
brightness_pct: 1
|
|
|
|
- alias: Lighting · Hallway · Motion Off
|
|
trigger:
|
|
platform: state
|
|
entity_id: group.hallway_motion
|
|
to: "off"
|
|
action:
|
|
- choose:
|
|
# Turn off in Day Mode
|
|
- conditions:
|
|
condition: state
|
|
entity_id: input_select.house_mode
|
|
state: 'day'
|
|
sequence:
|
|
- service: light.turn_off
|
|
entity_id: light.hallway
|
|
- service: light.turn_on
|
|
entity_id: light.browser_hallway
|
|
data:
|
|
brightness_pct: 1
|
|
# Turn off in Night Mode
|
|
default:
|
|
- service: light.turn_off
|
|
entity_id:
|
|
- light.hue_white_1
|
|
- light.hue_1
|
|
- service: light.turn_on
|
|
entity_id: light.browser_hallway
|
|
data:
|
|
brightness_pct: 1
|