Updates
This commit is contained in:
@ -102,9 +102,13 @@ script:
|
||||
state: "on"
|
||||
then:
|
||||
- service: script.summary_notification
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.all_lights
|
||||
else:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.snapshot_all
|
||||
#- service: light.turn_on
|
||||
# target:
|
||||
# entity_id: light.all_lights
|
||||
# 1,0 Ceiling
|
||||
- if:
|
||||
- condition:
|
||||
@ -115,6 +119,9 @@ script:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.ceiling
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# 2,0 Bed
|
||||
- if:
|
||||
- condition:
|
||||
@ -125,6 +132,9 @@ script:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.bed_ceiling
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# 3,0 Indirect
|
||||
- if:
|
||||
- condition:
|
||||
@ -135,6 +145,9 @@ script:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.all_indirect
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# 4,0 All Lights
|
||||
- if:
|
||||
- condition:
|
||||
@ -145,6 +158,9 @@ script:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.all_lights
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# 0,1 Adaptive
|
||||
- if:
|
||||
- condition:
|
||||
@ -155,6 +171,9 @@ script:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.light_adaptive
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# 0,2 Night
|
||||
- if:
|
||||
- condition:
|
||||
@ -165,6 +184,9 @@ script:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.light_night
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# 0,3 Bright
|
||||
- if:
|
||||
- condition:
|
||||
@ -175,13 +197,9 @@ script:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.light_bright
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 2
|
||||
milliseconds: 0
|
||||
- service: script.light_store_save
|
||||
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
mode: single
|
||||
#----------------------------------------------------------------------------------#
|
||||
# Down
|
||||
@ -189,7 +207,6 @@ script:
|
||||
pos_down:
|
||||
alias: pos_down
|
||||
sequence:
|
||||
- service: script.light_store_save
|
||||
# 0,0
|
||||
- if:
|
||||
- condition: and
|
||||
@ -208,9 +225,10 @@ script:
|
||||
state: "off"
|
||||
then:
|
||||
- service: script.summary_notification
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.all_lights
|
||||
else:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.all_lights
|
||||
# 1,0 Ceiling
|
||||
- if:
|
||||
- condition:
|
||||
@ -221,6 +239,9 @@ script:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.ceiling
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# 2,0 Bed
|
||||
- if:
|
||||
- condition:
|
||||
@ -231,6 +252,9 @@ script:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.bed_ceiling
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# 3,0 Indirect
|
||||
- if:
|
||||
- condition:
|
||||
@ -241,6 +265,9 @@ script:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.all_indirect
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# 4,0 All Lights
|
||||
- if:
|
||||
- condition:
|
||||
@ -337,12 +364,9 @@ automation:
|
||||
- input_number.pos_left
|
||||
to: "1.0"
|
||||
action:
|
||||
- service: script.light_ceiling_save
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
milliseconds: 500
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
- service: light.turn_on
|
||||
data:
|
||||
effect: Twitter
|
||||
@ -353,7 +377,9 @@ automation:
|
||||
minutes: 0
|
||||
seconds: 1
|
||||
milliseconds: 0
|
||||
- service: script.light_ceiling_restore
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.snapshot_all
|
||||
# Pos 2,0 Ceiling Bed
|
||||
- alias: pos_2_0_flash
|
||||
mode: single
|
||||
@ -363,12 +389,9 @@ automation:
|
||||
- input_number.pos_left
|
||||
to: "2.0"
|
||||
action:
|
||||
- service: script.light_ceiling_bed_save
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
milliseconds: 500
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
- service: light.turn_on
|
||||
data:
|
||||
effect: Twitter
|
||||
@ -379,7 +402,9 @@ automation:
|
||||
minutes: 0
|
||||
seconds: 1
|
||||
milliseconds: 0
|
||||
- service: script.light_ceiling_bed_restore
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.snapshot_all
|
||||
# Pos 3,0 Indirect
|
||||
- alias: pos_3_0_flash
|
||||
mode: single
|
||||
@ -389,12 +414,9 @@ automation:
|
||||
- input_number.pos_left
|
||||
to: "3.0"
|
||||
action:
|
||||
- service: script.light_indirect_save
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
milliseconds: 500
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
- service: light.turn_on
|
||||
data:
|
||||
effect: Twitter
|
||||
@ -405,7 +427,9 @@ automation:
|
||||
minutes: 0
|
||||
seconds: 1
|
||||
milliseconds: 0
|
||||
- service: script.light_indirect_restore
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.snapshot_all
|
||||
# Pos 4,0 All Lights
|
||||
- alias: pos_4_0_flash
|
||||
mode: single
|
||||
@ -415,12 +439,9 @@ automation:
|
||||
- input_number.pos_left
|
||||
to: "4.0"
|
||||
action:
|
||||
- service: script.light_store_save
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
milliseconds: 500
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
- service: light.turn_on
|
||||
data:
|
||||
effect: Twitter
|
||||
@ -431,7 +452,9 @@ automation:
|
||||
minutes: 0
|
||||
seconds: 1
|
||||
milliseconds: 0
|
||||
- service: script.light_store_restore
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.snapshot_all
|
||||
# Pos 0,1 Adaptive
|
||||
- alias: pos_0_1_flash
|
||||
mode: single
|
||||
@ -444,6 +467,9 @@ automation:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.light_adaptive
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# Pos 0,2
|
||||
- alias: pos_0_2_flash
|
||||
mode: single
|
||||
@ -456,6 +482,9 @@ automation:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.light_night
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
||||
# Pos 0,3
|
||||
- alias: pos_0_3_flash
|
||||
mode: single
|
||||
@ -467,4 +496,7 @@ automation:
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.light_bright
|
||||
entity_id: scene.light_bright
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id: automation.light_all_snapshot
|
@ -6,32 +6,22 @@
|
||||
## -------------------------------------------------------------------------------------------------##
|
||||
## Wetter-Plattform
|
||||
## -------------------------------------------------------------------------------------------------##
|
||||
weather:
|
||||
- platform: pirateweather
|
||||
api_key: !secret pirateweather
|
||||
mode: daily
|
||||
|
||||
sun:
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
temperature_outside:
|
||||
value_template: '{{ states.weather.home.attributes.temperature }}'
|
||||
value_template: '{{ states.weather.openweathermap.attributes.temperature }}'
|
||||
friendly_name: 'Outside Temperature'
|
||||
unit_of_measurement: '°C'
|
||||
temperature_today_max:
|
||||
temperature_today:
|
||||
value_template: >
|
||||
{{ state_attr('weather.pirateweather', 'forecast')[0].temperature }}
|
||||
{{ state_attr('weather.home', 'forecast')[0].temperature }}
|
||||
friendly_name: 'Max Temperature'
|
||||
unit_of_measurement: '°C'
|
||||
temperature_today_min:
|
||||
value_template: >
|
||||
{{ state_attr("weather.pirateweather", "forecast")[0].templow }}
|
||||
friendly_name: 'Min Temperature'
|
||||
unit_of_measurement: '°C'
|
||||
temperature_today_condition:
|
||||
value_template: >
|
||||
{{ state_attr('weather.pirateweather', 'forecast')[0].condition }}
|
||||
friendly_name: 'Condition'
|
||||
{{ state_attr('weather.home', 'forecast')[0].condition }}
|
||||
friendly_name: 'Condition'
|
||||
|
||||
|
||||
sun:
|
@ -39,7 +39,6 @@ history:
|
||||
map:
|
||||
mobile_app:
|
||||
person:
|
||||
python_script:
|
||||
ssdp:
|
||||
system_health:
|
||||
timer:
|
||||
|
@ -4,13 +4,12 @@ script:
|
||||
- service: notify.notify
|
||||
data:
|
||||
message: >
|
||||
{% set maxTemp = states("sensor.temperature_today_max") %}
|
||||
{% set minTemp = states("sensor.temperature_today_min") %}
|
||||
{% set maxTemp = states("sensor.temperature_today") %}
|
||||
{% set condition = states("sensor.temperature_today_condition") %}
|
||||
{% set currentTemp = states("sensor.temperature_outside") %}
|
||||
{% set recommendation = states("sensor.climate_temp_recommendation") %}
|
||||
{% set insideTemp = states("sensor.temperature_kai_temperature") %}
|
||||
At the moment it is {{ condition }} outside with a temperature of {{ currentTemp }}°C.
|
||||
Todays temperature will be between {{ maxTemp }}°C and {{ minTemp }}°C.
|
||||
Todays max temperature will be {{ maxTemp }}°C.
|
||||
It is {{ insideTemp }} inside and recommended to {{ recommendation }}.
|
||||
mode: single
|
@ -3,6 +3,4 @@ notify:
|
||||
name: browser
|
||||
vapid_pub_key: !secret google_api_pub
|
||||
vapid_prv_key: !secret google_api_priv
|
||||
vapid_email: !secret google_api_email
|
||||
|
||||
|
||||
vapid_email: !secret google_api_email
|
20
packages/light/light_snapshot.yaml
Normal file
20
packages/light/light_snapshot.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
automation:
|
||||
- alias: light_all_snapshot
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
seconds: "30"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.all_lights
|
||||
state: "on"
|
||||
action:
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: snapshot_all
|
||||
snapshot_entities:
|
||||
- light.all_indirect
|
||||
- light.bed_ceiling
|
||||
- light.ceiling
|
||||
- switch.adaptive_lighting_sleep_mode_default
|
||||
- switch.adaptive_lighting_default
|
@ -1,81 +0,0 @@
|
||||
## -------------------------------------------------------------------------------------------------##
|
||||
## Light_Store
|
||||
## https://github.com/pnbruckner/homeassistant-config/blob/master/python_scripts/light_store.py
|
||||
## -------------------------------------------------------------------------------------------------##
|
||||
script:
|
||||
#----------------------------------------------------------------------------------#
|
||||
# All Lights
|
||||
#----------------------------------------------------------------------------------#
|
||||
light_store_save:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: flash_store
|
||||
entity_id:
|
||||
- light.bed
|
||||
- light.ceiling
|
||||
- light.desk
|
||||
- light.bed_ceiling
|
||||
- light.tv
|
||||
light_store_off:
|
||||
sequence:
|
||||
- service: script.light_store_save
|
||||
- service: light.turn_off
|
||||
entity_id: light.all_lights
|
||||
light_store_restore:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: flash_store
|
||||
operation: restore
|
||||
|
||||
#----------------------------------------------------------------------------------#
|
||||
# Ceiling only
|
||||
#----------------------------------------------------------------------------------#
|
||||
light_ceiling_save:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
entity_id:
|
||||
- light.ceiling
|
||||
light_ceiling_restore:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
operation: restore
|
||||
|
||||
#----------------------------------------------------------------------------------#
|
||||
# Ceiling Bed only
|
||||
#----------------------------------------------------------------------------------#
|
||||
light_ceiling_bed_save:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
entity_id:
|
||||
- light.bed_ceiling
|
||||
light_ceiling_bed_restore:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
operation: restore
|
||||
|
||||
#----------------------------------------------------------------------------------#
|
||||
# Indirect only
|
||||
#----------------------------------------------------------------------------------#
|
||||
light_indirect_save:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
entity_id:
|
||||
- light.all_indirect
|
||||
light_indirect_restore:
|
||||
sequence:
|
||||
- service: python_script.light_store
|
||||
data:
|
||||
store_name: ceiling_store
|
||||
operation: restore
|
Reference in New Issue
Block a user