Created
December 13, 2024 16:32
-
-
Save Didgeridrew/9cab1e938d4180b93c8b0363ce97fa47 to your computer and use it in GitHub Desktop.
HA - Blueprint - Increase or Decrease Target Temperature (Relative)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Increase or Decrease Target Temperature (Relative) | |
description: Increase or decrease the temperature a given number of degrees relative to the current setting | |
domain: script | |
input: | |
climate_ent: | |
selector: | |
entity: | |
filter: | |
domain: climate | |
multiple: true | |
name: Thermostat | |
deg_change: | |
default: 1 | |
name: Number of degrees | |
selector: | |
number: | |
min: -15 | |
max: 15 | |
step: 0.1 | |
hvac_action: | |
default: false | |
name: Using Heat/Cool Mode | |
selector: | |
boolean: | |
low_high: | |
default: 'Not using Heat/Cool' | |
name: Temperature Target Type | |
selector: | |
select: | |
options: | |
- High | |
- Low | |
- Not using Heat/Cool | |
mode: queued | |
variables: | |
targets: !input climate_ent | |
offset: !input deg_change | |
h_c: !input hvac_action | |
l_h: !input low_high | |
sequence: | |
- repeat: | |
for_each: "{{ targets }}" | |
sequence: | |
- choose: | |
- conditions: | |
- condition: template | |
value_template: "{{ h_c }}" | |
- condition: template | |
value_template: "{{ l_h == 'High' }}" | |
sequence: | |
- action: climate.set_temperature | |
target: | |
entity_id: "{{ repeat.item }}" | |
data: | |
target_temp_high: | | |
{{ state_attr(repeat.item, 'target_temp_high')|float(0) + offset|float(0) }} | |
target_temp_low: "{{ state_attr(repeat.item, 'target_temp_low')|float(0) }}" | |
hvac_mode: heat_cool | |
- conditions: | |
- condition: template | |
value_template: "{{ h_c }}" | |
- condition: template | |
value_template: "{{ l_h == 'Low' }}" | |
sequence: | |
- action: climate.set_temperature | |
target: | |
entity_id: "{{ repeat.item }}" | |
data: | |
target_temp_low: | | |
{{ state_attr(repeat.item, 'target_temp_low')|float(0) + offset|float(0) }} | |
target_temp_high: "{{ state_attr(repeat.item, 'target_temp_high')|float(0) }}" | |
hvac_mode: heat_cool | |
default: | |
- action: climate.set_temperature | |
target: | |
entity_id: "{{ repeat.item }}" | |
data: | |
temperature: "{{ state_attr(repeat.item, 'temperature')|float(0) + offset|float(0) }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment