mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
alias: "Master Bedroom Not Occupied"
|
|
id: automation_master_bedroom_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.bedroom_occupied
|
|
to: "off"
|
|
for: "00:05:00"
|
|
|
|
# - platform: time_pattern
|
|
# minutes: "/5"
|
|
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.lights_off_manually
|
|
state: "off"
|
|
- condition: state
|
|
entity_id:
|
|
- binary_sensor.bed_presence_c175a4_bed_occupied_either
|
|
state:
|
|
- "off"
|
|
- "unavailable"
|
|
|
|
- condition: state
|
|
entity_id: input_boolean.bedroom_occupied
|
|
state: "on"
|
|
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.home_occupied
|
|
state: "off"
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.master_bedroom_person_occupancy
|
|
state: "off"
|
|
for:
|
|
minutes: 5
|
|
- condition: state
|
|
entity_id: binary_sensor.bedroom_occupied
|
|
state: "off"
|
|
for:
|
|
minutes: 5
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.home_occupied
|
|
state: "off"
|
|
sequence:
|
|
- action: homeassistant.turn_off
|
|
entity_id: input_boolean.bedroom_occupied
|
|
- conditions:
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.house
|
|
state: "Manual"
|
|
sequence:
|
|
- action: homeassistant.turn_off
|
|
entity_id: input_boolean.bedroom_occupied
|