mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-04-29 06:48:16 +00:00
Refactor conditions and triggers based on sun
This commit is contained in:
@@ -5,11 +5,9 @@ automation:
|
||||
entity_id: binary_sensor.motion_2_ias_zone
|
||||
to: "on"
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: 'day'
|
||||
condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: 'day'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.hallway_all_lights
|
||||
|
||||
@@ -35,6 +35,7 @@ automation:
|
||||
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
||||
|
||||
- alias: Lighting · Temperature · Adjust based on time
|
||||
# TODO: this trigger is not good. Figure out something else.
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sun.sun
|
||||
|
||||
@@ -23,9 +23,8 @@ script:
|
||||
routine_coming_home_after_sunset:
|
||||
alias: Routine · Coming home · After sunset
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: "below_horizon"
|
||||
- condition: sun
|
||||
after: sunset
|
||||
- service: light.turn_on
|
||||
entity_id: light.on_after_dark
|
||||
data:
|
||||
|
||||
Reference in New Issue
Block a user