121 lines
4.1 KiB
YAML
121 lines
4.1 KiB
YAML
|
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
|