mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
91 lines
2.4 KiB
YAML
91 lines
2.4 KiB
YAML
alias: Master Bedroom Lights to Off
|
|
id: automation_master_bedroom_lights_to_off
|
|
mode: single
|
|
# Hide warnings when triggered while in delay.
|
|
max_exceeded: silent
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.master_bedroom_mode
|
|
|
|
- platform: state
|
|
entity_id: input_boolean.master_bedroom_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: light.master_bedroom_hue
|
|
state: "on"
|
|
|
|
- alias: "Master Bedroom light cycle not on"
|
|
condition: state
|
|
entity_id: input_boolean.master_bedroom_light_cycle
|
|
state: "off"
|
|
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.master_bedroom_1
|
|
state: "on"
|
|
- condition: state
|
|
entity_id: light.master_bedroom_2
|
|
state: "on"
|
|
- condition: state
|
|
entity_id: light.master_bedroom_3
|
|
state: "on"
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.master_bedroom_mode
|
|
state: "Off"
|
|
- condition: state
|
|
entity_id: input_boolean.master_bedroom_occupied
|
|
state: "off"
|
|
- condition: state
|
|
entity_id: input_select.master_bedroom_mode
|
|
state: "Nightlight"
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.lighting_automations
|
|
state: "on"
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.master_bedroom_mode
|
|
state: "Off"
|
|
- condition: state
|
|
entity_id: input_boolean.master_bedroom_occupied
|
|
state: "off"
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.master_bedroom_mode
|
|
state: "Manual"
|
|
sequence:
|
|
- action: scene.turn_on
|
|
data:
|
|
transition: 5
|
|
target:
|
|
entity_id: scene.master_bedroom_hue_off
|
|
default:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.master_bedroom_1
|
|
- light.master_bedroom_2
|
|
- light.master_bedroom_3
|
|
- light.accent
|
|
- light.master_bedroom_accent
|