mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-12-03 03:21:47 +00:00
Refactor living room automation for clarity and consistency
This commit is contained in:
@@ -78,34 +78,34 @@
|
|||||||
kelvin: 2700
|
kelvin: 2700
|
||||||
brightness: 200
|
brightness: 200
|
||||||
|
|
||||||
- alias: 'Living Room Red on Entry/Garage Open'
|
- alias: 'Living Room Red on Entry/Garage Open'
|
||||||
id: living_room_red_on_entry_open
|
id: living_room_red_on_entry_open
|
||||||
mode: restart
|
mode: restart
|
||||||
variables:
|
variables:
|
||||||
was_off: "{{ is_state('light.living_room_lights', 'off') }}"
|
was_off: "{{ is_state('light.living_room_lights', 'off') }}"
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.entry_points
|
entity_id: group.entry_points
|
||||||
to: 'on'
|
to: 'on'
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.garage_doors
|
entity_id: group.garage_doors
|
||||||
from: 'closed'
|
from: 'closed'
|
||||||
to: 'open'
|
to: 'open'
|
||||||
action:
|
action:
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: scene.red_living_room
|
entity_id: scene.red_living_room
|
||||||
- wait_for_trigger:
|
- wait_for_trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.entry_points
|
entity_id: group.entry_points
|
||||||
to: 'off'
|
to: 'off'
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.garage_doors
|
entity_id: group.garage_doors
|
||||||
to: 'closed'
|
to: 'closed'
|
||||||
timeout: "01:00:00"
|
timeout: "01:00:00"
|
||||||
- choose:
|
- choose:
|
||||||
- conditions: "{{ was_off }}"
|
- conditions: "{{ was_off }}"
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: light.living_room_lights
|
entity_id: light.living_room_lights
|
||||||
|
|||||||
Reference in New Issue
Block a user