mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-02 23:54:25 +00:00
74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
automation:
|
|
- alias: Lighting · Hallway · Day mode · Motion · Turn lights on
|
|
trigger:
|
|
platform: state
|
|
entity_id: binary_sensor.motion_2_ias_zone
|
|
to: "on"
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.house_mode
|
|
state: 'day'
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: 'below_horizon'
|
|
action:
|
|
- service: light.turn_on
|
|
entity_id: light.hallway_all_lights
|
|
|
|
- alias: Lighting · Hallway · Day mode · Motion · Turn lights off
|
|
trigger:
|
|
platform: state
|
|
entity_id: binary_sensor.motion_2_ias_zone
|
|
to: "off"
|
|
for:
|
|
minutes: 5
|
|
condition:
|
|
condition: state
|
|
entity_id: input_select.house_mode
|
|
state: 'day'
|
|
action:
|
|
- service: light.turn_off
|
|
entity_id: light.hallway_all_lights
|
|
|
|
- alias: Lighting · Hallway · Night mode · Motion · Turn lights on
|
|
trigger:
|
|
platform: state
|
|
entity_id: binary_sensor.motion_2_ias_zone
|
|
to: "on"
|
|
condition:
|
|
condition: template
|
|
value_template: "{{ not is_state('input_select.house_mode', 'day') }}"
|
|
action:
|
|
- service: light.turn_on
|
|
entity_id: light.light_lohas_6
|
|
data:
|
|
brightness_pct: 30
|
|
- service: light.turn_on
|
|
entity_id: light.light_le_8
|
|
data:
|
|
brightness_pct: 13
|
|
|
|
- alias: Lighting · Hallway · Night mode · Motion · Turn lights off
|
|
trigger:
|
|
platform: state
|
|
entity_id: binary_sensor.motion_2_ias_zone
|
|
to: "off"
|
|
for:
|
|
minutes: 5
|
|
condition:
|
|
condition: template
|
|
value_template: "{{ not is_state('input_select.house_mode', 'day') }}"
|
|
action:
|
|
- service: light.turn_on
|
|
entity_id:
|
|
- light.light_le_8
|
|
- light.light_lohas_6
|
|
data:
|
|
brightness_pct: 100
|
|
- service: light.turn_off
|
|
entity_id:
|
|
- light.light_lohas_6
|
|
- light.light_le_8
|