mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
alias: Nursery Lights to Off
|
|
id: automation_nursery_lights_to_off
|
|
mode: restart
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.nursery_mode
|
|
|
|
- platform: state
|
|
entity_id: input_boolean.nursery_occupied
|
|
to: "off"
|
|
|
|
- platform: state
|
|
id: light_level
|
|
entity_id: binary_sensor.nursery_naturally_lit
|
|
from: "off"
|
|
to: "on"
|
|
|
|
#- platform: time_pattern
|
|
# minutes: "/5"
|
|
|
|
condition:
|
|
- condition: state
|
|
entity_id: light.nursery_hue
|
|
state: "on"
|
|
|
|
- alias: "Nursery light cycle not on"
|
|
condition: state
|
|
entity_id: input_boolean.nursery_light_cycle
|
|
state: "off"
|
|
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.nursery_mode
|
|
state: "Off"
|
|
- condition: state
|
|
entity_id: input_boolean.nursery_occupied
|
|
state: "off"
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.lighting_automations
|
|
state: "on"
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.nursery_mode
|
|
state: "Off"
|
|
- condition: state
|
|
entity_id: input_boolean.nursery_occupied
|
|
state: "off"
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.nursery_mode
|
|
state: "Manual"
|
|
sequence:
|
|
- action: scene.turn_on
|
|
data:
|
|
transition: 5
|
|
target:
|
|
entity_id: scene.nursery_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: light.nursery_color_1, light.nursery_color_2
|