This repository has been archived on 2023-06-10. You can view files and clone it, but cannot push or open issues or pull requests.
homeassistant-config/packages/climate/climate_automation.yaml
darthsandmann 853c1d1716 updates
2022-08-30 18:42:25 +02:00

123 lines
4.1 KiB
YAML
Executable File

automation:
## -----------------------------------------------------------------------------------------------##
## Notification on state change
## -----------------------------------------------------------------------------------------------##
- alias: "climate_recommendation_close"
trigger:
- platform: state
entity_id: sensor.climate_temp_recommendation
from: 'open the window'
to: 'close the window'
action:
- service: notify.notify
data:
message: "Close the window."
- alias: "climate_recommendation_open"
trigger:
- platform: state
entity_id: sensor.climate_temp_recommendation
from: 'close the window'
to: 'open the 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