mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 11:00:14 -04:00
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
alias: 'Blue Room Not Occupied'
|
|
id: automation_blue_room_not_occupied
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.home_occupied
|
|
from: 'on'
|
|
to: 'off'
|
|
|
|
- platform: state
|
|
entity_id:
|
|
- input_boolean.home_occupied
|
|
- binary_sensor.blue_room_occupied
|
|
to: 'off'
|
|
for: '00:10:00'
|
|
|
|
# - platform: time_pattern
|
|
# minutes: "/5"
|
|
|
|
condition:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.home_occupied
|
|
state: 'off'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.blue_room_occupied
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.blue_room_occupied
|
|
state: 'off'
|
|
for: '00:10:00'
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.home_occupied
|
|
state: 'off'
|
|
sequence:
|
|
- service: homeassistant.turn_off
|
|
entity_id: input_boolean.blue_room_occupied
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.house
|
|
state: 'Auto'
|
|
- condition: state
|
|
entity_id: input_select.house
|
|
state: 'Dad'
|
|
- condition: state
|
|
entity_id: input_select.house
|
|
state: 'Bachelor'
|
|
sequence:
|
|
- service: homeassistant.turn_off
|
|
entity_id: input_boolean.blue_room_occupied
|