mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-09 23:02:59 +00:00
Various improvements to automations and UI
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
script:
|
||||
dashboards_light_down:
|
||||
alias: "Dashboards · Light down"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.browser_kitchen
|
||||
- light.browser_hallway
|
||||
data:
|
||||
brightness_pct: 1
|
||||
@@ -89,3 +89,38 @@ scene:
|
||||
state: "on"
|
||||
color_temp: 500
|
||||
brightness: 255
|
||||
|
||||
automation:
|
||||
- alias: Lighting · Bedroom · Door open
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.bedroom_door
|
||||
to: "on"
|
||||
condition:
|
||||
condition: sun
|
||||
after: sunset
|
||||
after_offset: "-02:00:00"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.master_bedroom_main
|
||||
|
||||
- alias: Lighting · Bedroom · Temperature · Adjust on start
|
||||
use_blueprint:
|
||||
path: light_on_set_temperature.yaml
|
||||
input:
|
||||
light: light.master_bedroom_main
|
||||
|
||||
- alias: Lighting · Bedroom · Temperature · Sunset
|
||||
use_blueprint:
|
||||
path: light_sun_set_temperature.yaml
|
||||
input:
|
||||
light: light.master_bedroom_main
|
||||
temp: 400
|
||||
|
||||
- alias: Lighting · Bedroom · Temperature · Night
|
||||
use_blueprint:
|
||||
path: light_sun_set_temperature.yaml
|
||||
input:
|
||||
light: light.master_bedroom_main
|
||||
temp: 500
|
||||
after_offset: "+03:00:00"
|
||||
|
||||
@@ -10,7 +10,7 @@ automation:
|
||||
state: "on"
|
||||
action:
|
||||
- choose:
|
||||
# Day Mode
|
||||
# Turn on in Day Mode
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house_mode
|
||||
@@ -22,7 +22,7 @@ automation:
|
||||
- light.browser_hallway
|
||||
data:
|
||||
brightness_pct: 100
|
||||
# Night Mode
|
||||
# Turn off in Night Mode
|
||||
default:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
@@ -39,7 +39,7 @@ automation:
|
||||
to: "off"
|
||||
action:
|
||||
- choose:
|
||||
# Day Mode
|
||||
# Turn off in Day Mode
|
||||
- conditions:
|
||||
condition: state
|
||||
entity_id: input_select.house_mode
|
||||
@@ -51,7 +51,7 @@ automation:
|
||||
entity_id: light.browser_hallway
|
||||
data:
|
||||
brightness_pct: 1
|
||||
# Night Mode
|
||||
# Turn off in Night Mode
|
||||
default:
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
|
||||
@@ -10,7 +10,7 @@ automation:
|
||||
state: "on"
|
||||
action:
|
||||
- choose:
|
||||
# Day Mode
|
||||
# Turn on in Day Mode
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house_mode
|
||||
@@ -32,7 +32,7 @@ automation:
|
||||
entity_id: light.kitchen
|
||||
data:
|
||||
brightness_pct: 100
|
||||
# Night Mode
|
||||
# Turn on in Night Mode
|
||||
default:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
@@ -42,40 +42,93 @@ automation:
|
||||
data:
|
||||
brightness_pct: 1
|
||||
|
||||
- alias: Lighting · Kitchen · Motion off
|
||||
- alias: Lighting · Kitchen · Night · Motion off
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.kitchen_motion_occupancy
|
||||
to: "off"
|
||||
for:
|
||||
minutes: 30
|
||||
minutes: 5
|
||||
condition:
|
||||
condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: 'day'
|
||||
action:
|
||||
- choose:
|
||||
# Day Mode
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: 'day'
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
entity_id: light.kitchen
|
||||
- service: light.turn_on
|
||||
entity_id: light.browser_kitchen
|
||||
data:
|
||||
brightness_pct: 1
|
||||
# Night Mode
|
||||
default:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.ledvance_1
|
||||
- light.hue_ambiance_1
|
||||
data:
|
||||
brightness_pct: 100
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.ledvance_1
|
||||
- light.hue_ambiance_1
|
||||
- service: light.turn_on
|
||||
entity_id: light.browser_kitchen
|
||||
data:
|
||||
brightness_pct: 1
|
||||
# Turn off in Night Mode
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.ledvance_1
|
||||
- light.hue_ambiance_1
|
||||
data:
|
||||
brightness_pct: 100
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.ledvance_1
|
||||
- light.hue_ambiance_1
|
||||
- service: light.turn_on
|
||||
entity_id: light.browser_kitchen
|
||||
data:
|
||||
brightness_pct: 1
|
||||
|
||||
- alias: Lighting · Kitchen · Day · Motion off
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.kitchen_motion_occupancy
|
||||
to: "off"
|
||||
for:
|
||||
minutes: 15
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: 'day'
|
||||
action:
|
||||
# Turn off in Day Mode
|
||||
- service: light.turn_off
|
||||
entity_id: light.kitchen
|
||||
- service: light.turn_on
|
||||
entity_id: light.browser_kitchen
|
||||
data:
|
||||
brightness_pct: 1
|
||||
|
||||
- alias: Lighting · Kitchen · Temperature · Main · Adjust on start
|
||||
use_blueprint:
|
||||
path: light_on_set_temperature.yaml
|
||||
input:
|
||||
light: light.kitchen_main
|
||||
|
||||
- alias: Lighting · Kitchen · Temperature · Secondary · Adjust on start
|
||||
use_blueprint:
|
||||
path: light_on_set_temperature.yaml
|
||||
input:
|
||||
light: light.kitchen_secondary
|
||||
|
||||
- alias: Lighting · Kitchen · Temperature · Main · Sunset
|
||||
use_blueprint:
|
||||
path: light_sun_set_temperature.yaml
|
||||
input:
|
||||
light: light.kitchen_main
|
||||
temp: 400
|
||||
|
||||
- alias: Lighting · Kitchen · Temperature · Secondary · Sunset
|
||||
use_blueprint:
|
||||
path: light_sun_set_temperature.yaml
|
||||
input:
|
||||
light: light.kitchen_secondary
|
||||
temp: 400
|
||||
|
||||
- alias: Lighting · Kitchen · Temperature · Main · Night
|
||||
use_blueprint:
|
||||
path: light_sun_set_temperature.yaml
|
||||
input:
|
||||
light: light.kitchen_main
|
||||
temp: 500
|
||||
after_offset: "+03:00:00"
|
||||
|
||||
- alias: Lighting · Kitchen · Temperature · Secondary · Night
|
||||
use_blueprint:
|
||||
path: light_sun_set_temperature.yaml
|
||||
input:
|
||||
light: light.kitchen_secondary
|
||||
temp: 500
|
||||
|
||||
@@ -21,3 +21,25 @@ scene:
|
||||
state: "on"
|
||||
color_temp: 284
|
||||
brightness_pct: 80
|
||||
|
||||
automation:
|
||||
- alias: Lighting · Living Room · Temperature · Adjust on start
|
||||
use_blueprint:
|
||||
path: light_on_set_temperature.yaml
|
||||
input:
|
||||
light: light.living_room_main
|
||||
|
||||
- alias: Lighting · Living Room · Temperature · Sunset
|
||||
use_blueprint:
|
||||
path: light_sun_set_temperature.yaml
|
||||
input:
|
||||
light: light.living_room_main
|
||||
temp: 400
|
||||
|
||||
- alias: Lighting · Living Room · Temperature · Night
|
||||
use_blueprint:
|
||||
path: light_sun_set_temperature.yaml
|
||||
input:
|
||||
light: light.living_room_main
|
||||
temp: 500
|
||||
after_offset: "+03:00:00"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user