I am trying to create an automation that reads the temperature from a sensor in a bedroom at 9:30 PM and then if the temperature is below a certain point, set the thermostat (out in the hallway) to 1 degrees higher than the current_temperature state reported by the thermostat. I have looked through the documentation and various examples, but I cannot find a way to read in the current_temperature state from a thermostat in an automation. Does anyone have any idea to get this to work?
alias: Increase Temperature - Master Bedroom
description: ''
trigger:
- platform: time
at: '21:30:00'
condition:
- condition: state
entity_id: sensor.master_bedroom_temperature
state: 'below: 66'
action:
- service: climate.set_temperature
data:
entity_id: climate.2nd_floor
temperature: '{{ float(state.current_temperature) + 1 }}'
hvac_mode: heat
mode: single
Thanks! I was looking for information about how to query states, but my search was probably too narrow by looking at the climate domain. Thanks for the tip about the numeric_state condition too.
I’ll know at 9:30 PM tonight if it all works correctly.
Yes, it worked perfectly. I had to increase the trigger temp to test because it has warmed up a bit, but this week is cooler and rainy, so it will be nice to have this working.
Thanks again for your help. It is the community that makes Home Assistant such a great product.
Please consider marking my first post with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has a accepted solution. This helps users find answers to similar questions.
When i open my windows and/or doors i want the set temperature from the heater to be written to a helper. And when my doors and windows are closed to continue to set my heater at that set temperature that was there before opening and closing the temperature.
is it possible to write the temperature to a helper and then use it afterwards?