Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrelung/5d5eed8bab2b88bbb428f2659779bc7f to your computer and use it in GitHub Desktop.
Save andrelung/5d5eed8bab2b88bbb428f2659779bc7f to your computer and use it in GitHub Desktop.
home-assistant_set-all-climates-to-target-temp-with-delay
blueprint:
name: Set-all-climates-to-target-temp-with-delay
domain: script
input:
target:
name: Target
description: Contains several climate entities
selector:
target:
entity:
domain: climate
delay:
name: Delay (Optional)
description: Wait before moving on to the next climate (HomematicIP has issues when setting too much devices at the same time)
default: 0
selector:
number:
min: 0
max: 60
unit_of_measurement: seconds
mode: slider
target_temp:
name: Target Temperature
description: New desired Temp
default: 10
selector:
number:
min: 5
max: 30
step: 0.5
unit_of_measurement: °C
mode: slider
mode: restart
icon: mdi:home-thermometer
variables:
my_targets: !input target
delay: !input delay
target_temp: !input target_temp
sequence:
- repeat:
for_each: "{{ my_targets.entity_id }}"
sequence:
- if:
- condition: template
value_template: "{{ state_attr(repeat.item, 'temperature') != target_temp |float(0) }}"
then:
# - service: climate.set_hvac_mode
# target: "{{ repeat.item }}"
# data:
# hvac_mode: "off"
- service: climate.set_temperature
target:
entity_id: "{{ repeat.item }}"
data:
temperature: "{{ target_temp }}"
- delay: "{{ delay }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment