mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
alias: Blue Room Lights to Off
|
|
id: automation_blue_room_lights_to_off
|
|
mode: restart
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.blue_room_mode
|
|
|
|
- platform: state
|
|
entity_id: input_boolean.blue_room_occupied
|
|
to: 'off'
|
|
|
|
#- platform: time_pattern
|
|
# minutes: "/5"
|
|
|
|
condition:
|
|
- condition: state
|
|
entity_id: light.blue_room_hue
|
|
state: 'on'
|
|
|
|
- condition: state
|
|
entity_id: input_boolean.lights_off_manually
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.blue_room_mode
|
|
state: 'Off'
|
|
- condition: state
|
|
entity_id: input_boolean.blue_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.blue_room_mode
|
|
state: 'Off'
|
|
- condition: state
|
|
entity_id: input_boolean.blue_room_occupied
|
|
state: 'off'
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.blue_room_mode
|
|
state: 'Manual'
|
|
sequence:
|
|
- service: scene.turn_on
|
|
data:
|
|
transition: 5
|
|
target:
|
|
entity_id: scene.blue_room_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"
|
|
service: homeassistant.turn_off
|
|
target:
|
|
entity_id: switch.blue_room_motion_switch
|