Refactor conditions and triggers based on sun

This commit is contained in:
2020-05-03 15:52:26 +03:00
parent c0c0beafd0
commit d6ad40a621
3 changed files with 6 additions and 8 deletions
@@ -5,9 +5,7 @@ automation:
entity_id: binary_sensor.motion_2_ias_zone
to: "on"
condition:
condition: and
conditions:
- condition: state
condition: state
entity_id: input_select.house_mode
state: 'day'
action:
@@ -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
+2 -3
View File
@@ -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: