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