Skip to content

Instantly share code, notes, and snippets.

@bbbenji
Forked from quallenbezwinger/set_climate_on_time.yaml
Last active December 30, 2021 23:38
Show Gist options
  • Save bbbenji/059c16e9aa4bcec21f77d52f0dbac320 to your computer and use it in GitHub Desktop.
Save bbbenji/059c16e9aa4bcec21f77d52f0dbac320 to your computer and use it in GitHub Desktop.
Set thermostat temperature at specific time - homeassistant blueprint
blueprint:
name: Set thermostat temperature at specific time
description: Sets a climate entities to a specifc temperature at a set time everyday. If climate entity is off, it is normally not accepting temperature updated. This blueprints checks if climate entity is off and the temperature update will be set when thermostat is going back in heating mode.
domain: automation
source_url: https://gist.github.com/bbbenji/059c16e9aa4bcec21f77d52f0dbac320
input:
persons:
name: Persons
description: Select the persons to be home.
default: {entity_id: []}
selector:
target:
entity:
domain: person
time_to_set:
name: Time
description: When should the temperature be set
selector:
time:
climate_entities:
name: Thermostats
description: Climate entities which will get the temperature update
default: {entity_id: []}
selector:
target:
entity:
domain: climate
temp_to_set:
name: Temperature
description: Temperature to set on defined time
default: 19.5
selector:
number:
min: 10
max: 30
unit_of_measurement: "°C"
step: 0.5
trigger:
- platform: time
at: !input time_to_set
mode: queued
conditions:
- condition: state
entity_id: !input persons
state: home
action:
- choose:
- conditions:
- condition: state
entity_id: !input climate_entities
state: "heat"
sequence:
- service: climate.set_temperature
entity_id: !input climate_entities
data:
temperature: !input temp_to_set
- conditions:
- condition: state
entity_id: !input climate_entities
state: "off"
sequence:
- wait_for_trigger:
platform: state
entity_id: !input climate_entities
from: "off"
to: "heat"
#delay is necessary to prevents an override by other functions like window/doors sensor control which are restoring the prevoius temperature
- delay: 10
- service: climate.set_temperature
entity_id: !input climate_entities
data:
temperature: !input temp_to_set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment