This commit is contained in:
darthsandmann
2022-08-02 14:03:44 +02:00
parent 3b5df0ad86
commit 9db4448fa4
27 changed files with 436 additions and 245 deletions

View File

@@ -0,0 +1,121 @@
automation:
## -----------------------------------------------------------------------------------------------##
## Notification on state change
## -----------------------------------------------------------------------------------------------##
- alias: "climate_recommendation_close"
trigger:
- platform: state
entity_id: sensor.climate_temp_recommendation
to: 'close window'
action:
- service: notify.notify
data:
message: "Close the window."
- alias: "climate_recommendation_open"
trigger:
- platform: state
entity_id: sensor.climate_temp_recommendation
to: 'open window'
action:
- service: notify.notify
data:
message: "Open the window."
## -----------------------------------------------------------------------------------------------##
## Trigger alle 15min um Abfrage und Temperaturanpassung durchzuführen
## -----------------------------------------------------------------------------------------------##
# - alias: climate_set_auto
# initial_state: on
# trigger:
# - platform: time_pattern
# minutes: '/5'
# - platform: state
# entity_id: sensor.climate_temp
# condition:
# - condition: template
# value_template: '{{ states.climate.kai.state != "unavailable" }}'
# action:
# - service: script.turn_on
# entity_id: script.climate_set
# - delay: '00:20'
# - service: script.turn_on
# entity_id: script.climate_set
# - service: input_number.set_value
# data_template:
# entity_id: input_number.climate_temp_last
# value: '{{ states("sensor.aqara_temperature_kai_temperature")|float }}'
# - alias: climate_set_manual
# initial_state: on
# trigger:
# - platform: state
# entity_id: input_number.climate_temp
# condition:
# - condition: template
# value_template: '{{ states.climate.kai.state != "unavailable" }}'
# action:
# - service: input_boolean.turn_off
# entity_id: input_boolean.climate_auto
# - service: script.turn_on
# entity_id: script.climate_set
# - delay: '00:20'
# - service: script.turn_on
# entity_id: script.climate_set
# - alias: climate_set_power_off
# initial_state: on
# trigger:
# - platform: state
# entity_id: input_boolean.climate_power
# to: "off"
# action:
# - service: climate.turn_off
# entity_id: climate.kai
# - delay: '00:20'
# - service: climate.turn_off
# entity_id: climate.kai
# - alias: climate_set_power_on
# initial_state: on
# trigger:
# - platform: state
# entity_id: input_boolean.climate_power
# to: "on"
# action:
# - service: climate.turn_on
# entity_id: climate.kai
# - delay: '00:20'
# - service: climate.turn_on
# entity_id: climate.kai
## -----------------------------------------------------------------------------------------------##
## Trigger alle 5min, wenn Wochentag -> aktiviere Weekday-Boolean
## -----------------------------------------------------------------------------------------------##
- alias: climate_weekday
initial_state: on
trigger:
platform: time_pattern
minutes: '/5'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
service: input_boolean.turn_on
entity_id: input_boolean.climate_weekday
## -----------------------------------------------------------------------------------------------##
## Trigger alle 5min, wenn Wochenende -> deaktiviere Weekday-Boolean
## -----------------------------------------------------------------------------------------------##
- alias: climate_weekend
initial_state: on
trigger:
platform: time_pattern
minutes: '/5'
condition:
- condition: time
weekday:
- sat
- sun
action:
service: input_boolean.turn_off
entity_id: input_boolean.climate_weekday

View File

@@ -1,99 +0,0 @@
automation:
## -----------------------------------------------------------------------------------------------##
## Trigger alle 15min um Abfrage und Temperaturanpassung durchzuführen
## -----------------------------------------------------------------------------------------------##
- alias: climate_set_auto
initial_state: on
trigger:
- platform: time_pattern
minutes: '/5'
- platform: state
entity_id: sensor.climate_temp
condition:
- condition: template
value_template: '{{ states.climate.kai.state != "unavailable" }}'
action:
- service: script.turn_on
entity_id: script.climate_set
- delay: '00:20'
- service: script.turn_on
entity_id: script.climate_set
- service: input_number.set_value
data_template:
entity_id: input_number.climate_temp_last
value: '{{ states("sensor.aqara_temperature_kai_temperature")|float }}'
- alias: climate_set_manual
initial_state: on
trigger:
- platform: state
entity_id: input_number.climate_temp
condition:
- condition: template
value_template: '{{ states.climate.kai.state != "unavailable" }}'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.climate_auto
- service: script.turn_on
entity_id: script.climate_set
- delay: '00:20'
- service: script.turn_on
entity_id: script.climate_set
- alias: climate_set_power_off
initial_state: on
trigger:
- platform: state
entity_id: input_boolean.climate_power
to: "off"
action:
- service: climate.turn_off
entity_id: climate.kai
- delay: '00:20'
- service: climate.turn_off
entity_id: climate.kai
- alias: climate_set_power_on
initial_state: on
trigger:
- platform: state
entity_id: input_boolean.climate_power
to: "on"
action:
- service: climate.turn_on
entity_id: climate.kai
- delay: '00:20'
- service: climate.turn_on
entity_id: climate.kai
## -----------------------------------------------------------------------------------------------##
## Trigger alle 5min, wenn Wochentag -> aktiviere Weekday-Boolean
## -----------------------------------------------------------------------------------------------##
- alias: climate_weekday
initial_state: on
trigger:
platform: time_pattern
minutes: '/5'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- sun
action:
service: input_boolean.turn_on
entity_id: input_boolean.climate_weekday
## -----------------------------------------------------------------------------------------------##
## Trigger alle 5min, wenn Wochenende -> deaktiviere Weekday-Boolean
## -----------------------------------------------------------------------------------------------##
- alias: climate_weekend
initial_state: on
trigger:
platform: time_pattern
minutes: '/5'
condition:
- condition: time
weekday:
- sat
action:
service: input_boolean.turn_off
entity_id: input_boolean.climate_weekday

View File

@@ -14,6 +14,11 @@ homeassistant:
- 10.10.10.0/24
lovelace:
mode: yaml
resources: !include ../../resources.yaml
http:
use_x_forwarded_for: true
trusted_proxies:
@@ -34,6 +39,7 @@ history:
map:
mobile_app:
person:
python_script:
ssdp:
system_health:
timer:

View File

@@ -1,30 +0,0 @@
lovelace:
mode: yaml
resources:
- url: /hacsfiles/button-card/button-card.js
type: module
- url: /hacsfiles/light-entity-card/light-entity-card.js
type: module
- url: /hacsfiles/lovelace-auto-entities/auto-entities.js
type: module
- url: /hacsfiles/lovelace-card-mod/card-mod.js
type: module
- url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
type: module
- url: /hacsfiles/mini-media-player/mini-media-player-bundle.js
type: module
- url: /hacsfiles/my-cards/my-slider.js
type: module
#- url: /hacsfiles/my-cards/my-slider-v2.js
# type: module
- url: /hacsfiles/my-cards/my-button.js
type: module
- url: /hacsfiles/simple-weather-card/simple-weather-card-bundle.js
type: module
- url: /hacsfiles/home-assistant-sun-card/home-assistant-sun-card.js
type: module
- url: /hacsfiles/lovelace-layout-card/layout-card.js
type: module
- url: /hacsfiles/lovelace-state-switch/state-switch.js
type: module

View File

@@ -48,8 +48,8 @@ homekit:
name: Lights Off
scene.light_blue:
name: Lights Blue
scene.light_flux:
name: Lights Flux
scene.light_adaptive:
name: Lights Adaptive
scene.light_night:
name: Lights Night
switch.circadian_lighting_circadian_lighting:

View File

@@ -0,0 +1,18 @@
adaptive_lighting:
- name: "default"
lights:
- light.stripe
- light.direct
prefer_rgb_color: false
transition: 45
initial_transition: 1
interval: 90
min_brightness: 1
max_brightness: 80
min_color_temp: 2700
max_color_temp: 6500
sleep_brightness: 1
sleep_color_temp: 1000
take_over_control: true
detect_non_ha_changes: false
only_once: false

View File

@@ -1,15 +1,14 @@
scene:
- name: light_alloff
entities:
light.all_lights: false
- name: light_flux
- name: light_adaptive
entities:
light.all_direct: false
light.all_indirect: true
switch.circadian_lighting_circadian_lighting: on
switch.adaptive_lighting_default: on
switch.adaptive_lighting_sleep_mode_default: off
- name: light_blue
entities:
switch.circadian_lighting_circadian_lighting: off
switch.adaptive_lighting_default: off
switch.adaptive_lighting_sleep_mode_default: off
light.all_direct: false
light.all_indirect:
rgb_color: [0, 0, 255]
@@ -17,9 +16,10 @@ scene:
brightness: 20
- name: light_night
entities:
switch.circadian_lighting_circadian_lighting: off
switch.adaptive_lighting_default: on
light.all_direct: false
light.all_indirect:
rgb_color: [255, 139, 21]
state: true
brightness: 1
brightness: 1
switch.adaptive_lighting_sleep_mode_default: on

View File

@@ -10,9 +10,9 @@ script:
store_name: flash_store
entity_id:
- light.bed
- light.closet
- light.ceiling
- light.desk
- light.direct
- light.bed_ceiling
- light.tv
light_store_off:
sequence:

View File

@@ -19,28 +19,28 @@ yeelight:
10.10.10.82:
name: ceiling1
save_on_change: False
transition: 2500
transition: 1500
10.10.10.83:
name: ceiling2
save_on_change: False
transition: 2500
transition: 1500
10.10.10.80:
name: ceiling3
save_on_change: False
transition: 2500
transition: 1500
10.10.10.81:
name: bed_ceiling
save_on_change: False
transition: 2500
transition: 1500
10.10.10.84:
name: bed
save_on_change: False
transition: 2500
transition: 1500
model: strip1
10.10.10.85:
name: desk
save_on_change: False
transition: 2500
transition: 1500
model: strip1

View File

@@ -20,4 +20,5 @@ sensor:
sensors:
temperature_outside_pirateweather:
value_template: '{{ states.weather.pirateweather.attributes.temperature }}'
friendly_name: 'Outside Temperature'
friendly_name: 'Outside Temperature'
unit_of_measurement: '°C'