mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
alias: Utility Room Lights to Off
|
|
id: automation_utility_room_lights_to_off
|
|
mode: restart
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.utility_room_mode
|
|
|
|
- platform: state
|
|
entity_id: input_boolean.utility_room_occupied
|
|
to: 'off'
|
|
|
|
#- platform: time_pattern
|
|
# minutes: "/5"
|
|
|
|
condition:
|
|
- condition: state
|
|
entity_id: light.utility_room_hue
|
|
state: 'on'
|
|
|
|
- condition: state
|
|
entity_id: input_boolean.lights_off_manually
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.utility_room_mode
|
|
state: 'Off'
|
|
- condition: state
|
|
entity_id: input_boolean.utility_room_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.utility_room_mode
|
|
state: 'Off'
|
|
- condition: state
|
|
entity_id: input_boolean.utility_room_occupied
|
|
state: 'off'
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.utility_room_mode
|
|
state: 'Manual'
|
|
sequence:
|
|
- service: light.turn_off
|
|
data:
|
|
entity_id:
|
|
- light.utility_room_vanity
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.laundry
|