99 lines
3.2 KiB
YAML
99 lines
3.2 KiB
YAML
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 |