mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
84 lines
2.4 KiB
YAML
84 lines
2.4 KiB
YAML
alias: Entryway Lights to Off
|
|
id: automation_entryway_lights_to_off
|
|
mode: restart
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.entryway_mode
|
|
|
|
- platform: state
|
|
entity_id: input_boolean.entryway_occupied
|
|
to: "off"
|
|
|
|
- platform: state
|
|
id: light_level
|
|
entity_id: binary_sensor.entryway_naturally_lit
|
|
from: "off"
|
|
to: "on"
|
|
#- platform: time_pattern
|
|
# minutes: "/5"
|
|
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.lighting_automations
|
|
state: "on"
|
|
|
|
- condition: state
|
|
entity_id: input_boolean.lights_off_manually
|
|
state: "off"
|
|
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.entryway_mode
|
|
state: "Off"
|
|
- condition: state
|
|
entity_id: input_boolean.entryway_occupied
|
|
state: "off"
|
|
- condition: state
|
|
entity_id: binary_sensor.entryway_naturally_lit
|
|
state: "on"
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.lighting_automations
|
|
state: "on"
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.entryway_mode
|
|
state: "Off"
|
|
- condition: state
|
|
entity_id: input_boolean.entryway_occupied
|
|
state: "off"
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.entryway_mode
|
|
state: "Manual"
|
|
- condition: state
|
|
entity_id: binary_sensor.entryway_naturally_lit
|
|
state: "on"
|
|
sequence:
|
|
- action: scene.turn_on
|
|
data:
|
|
transition: 5
|
|
target:
|
|
entity_id: scene.entryway_hue_off
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: "on"
|
|
sequence:
|
|
- alias: "Turn off z-wave switch since all lights are off"
|
|
action: homeassistant.turn_off
|
|
target:
|
|
entity_id: switch.entryway_motion_switch
|