mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
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:
|
||||
- action: input_boolean.turn_on
|
||||
entity_id: input_boolean.computer_area_occupied
|
||||
Reference in New Issue
Block a user