mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
34 lines
920 B
YAML
34 lines
920 B
YAML
alias: 'Computer Area Occupied'
|
|
id: automation_computer_area_occupied
|
|
mode: restart
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.computer_area_occupied
|
|
to: 'on'
|
|
condition:
|
|
# Computer area was not already occupied or computer area light is off while not set to manual or off
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.computer_area_occupied
|
|
state: 'off'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: light.computer_area_hue
|
|
state: 'off'
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_select.computer_area_mode
|
|
state: 'Off'
|
|
- condition: state
|
|
entity_id: input_select.computer_area_mode
|
|
state: 'Manual'
|
|
|
|
action:
|
|
- service: input_boolean.turn_on
|
|
entity_id: input_boolean.computer_area_occupied
|