Hallway day mode light automation

This commit is contained in:
2020-04-28 23:49:57 +03:00
parent 111d3feb4e
commit 247f84c088
2 changed files with 42 additions and 2 deletions

View File

@@ -60,6 +60,8 @@ cards:
- automation.lighting_kitchen_night_mode_motion_turn_lights_on
- automation.lighting_kitchen_night_mode_motion_turn_lights_off
- type: divider
- automation.lighting_hallway_day_mode_motion_turn_lights_on
- automation.lighting_hallway_day_mode_motion_turn_lights_off
- automation.lighting_hallway_night_mode_motion_turn_lights_on
- automation.lighting_hallway_night_mode_motion_turn_lights_off
- type: divider

View File

@@ -109,7 +109,7 @@ automation:
entity_id: binary_sensor.motion_1_ias_zone
to: "off"
for:
minutes: 10
minutes: 5
condition:
condition: template
value_template: "{{ not is_state('input_select.house_mode', 'day') }}"
@@ -121,6 +121,44 @@ automation:
- service: light.turn_off
entity_id: light.light_le_12
- 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: 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_off
entity_id: light.hallway_all_lights
- alias: Lighting · Hallway · Night mode · Motion · Turn lights on
trigger:
platform: state
@@ -145,7 +183,7 @@ automation:
entity_id: binary_sensor.motion_2_ias_zone
to: "off"
for:
minutes: 10
minutes: 5
condition:
condition: template
value_template: "{{ not is_state('input_select.house_mode', 'day') }}"