Various improvements to automations and UI

This commit is contained in:
2021-05-18 18:59:10 +03:00
parent dbbda673f4
commit af18dffdb3
22 changed files with 338 additions and 192 deletions
@@ -1,42 +1,21 @@
automation:
- alias: Lighting · Temperature · Adjust on start
mode: parallel
trigger:
platform: state
entity_id:
- light.kitchen_main
- light.kitchen_secondary
- light.master_bedroom_main
- light.living_room_main
to: "on"
condition:
- condition: state
entity_id: input_select.house_mode
state: 'day'
action:
- service: light.turn_on
data_template:
entity_id: "{{ trigger.entity_id }}"
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
- alias: Lighting · Temperature · Adjust based on time
trigger:
platform: sun
event: sunset
action:
- service: light.turn_on
data_template:
entity_id:
- light.master_bedroom_main
- light.living_room_main
- light.kitchen_secondary
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
- service: logbook.log
data_template:
name: "💡 Lighting Module · "
message: >-
Adjusting temperature - sun changed from {{ trigger.from_state.state }} to {{ trigger.to_state.state }}
domain: light
# automation:
# - alias: Lighting · Temperature · Adjust based on time
# trigger:
# platform: sun
# event: sunset
# action:
# - service: light.turn_on
# data_template:
# entity_id:
# - light.master_bedroom_main
# - light.living_room_main
# color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
# - service: logbook.log
# data_template:
# name: "💡 Lighting Module · "
# message: >-
# Adjusting temperature - sun changed from {{ trigger.from_state.state }} to {{ trigger.to_state.state }}
# domain: light
# switch:
# - platform: flux