Thermostat Blueprint Help Set Temp based on Outside Weather

I need help making a blueprint that would adjust the tempature of my thermostat based on outside tempature

I have done the math and this is how it needs to be.
at 65 Degrees outside, The thermostat would start out at 72
then at 51.7 I need the thermostat to go up 0.75 degrees, so at 38.4 it would need to be 73.5
for every -14.4 degreese outside, the temp goes up 0.75.

I live in a mobile home and they dont insulate these homes as good as a real house. It was -15 degrees last winter here and I was rocking 77 on my thermostat. I would like to have this automated.

The real math is for every 1 degree drop in tempature the thermostat must go up 0.06944444 degrees but it would need to be a absolute value without decimal’s.

Anyone be able to help me with this. I would also like to have a link to a field input on a lovelace card to specifiy this offset instead of it beeing hard programmed into a blueprint.

PLEASE HELP!!!

Thalia Montreux

Template for your thermostat setpoint:

{{((-0.0625 * state_attr('weather.home','temperature')) + 76.0625) | round (0)}}

Does it need to be a blueprint or will an automation do ?

blueprint would be awesome. maybe allow inputting the temperatures as well if possible so people can customize it for drafty houses.

I’m kind of new to home assistant. I want to be able to set up a couple helpers, for input fields. one for the comfort temperature I prefer. then the difference based on the outside temperature, as it drops it increases and as it rises it decreases the thermostat temperature. only by little fractional amounts at a time,

how would I use your current template as a automation ?

I am a newbie myself, however, I would think you can set up an automation with the time pattern as the trigger and make it run every 5 minutes or something and the action would be to “Call Service” to set thermostat temperature. For the value you could use that formula.

So, here’s my automation. Mine is in celcius so I had to make some math changes.

alias: Thermostat | Set Temperature based on weather
description: ''
trigger:
  - platform: time_pattern
    minutes: /5
condition: []
action:
  - service: climate.set_temperature
    target:
      entity_id: climate.first_floor
    data:
      hvac_mode: heat_cool
      target_temp_high: >-
        {{((-0.125 * state_attr('weather.home','temperature')) + 24.8) | round
        (0)}}
      target_temp_low: >-
        {{((-0.125 * state_attr('weather.home','temperature')) + 23.0) | round
        (0)}}
mode: single

Having the trigger as the state of weather.home would ensure that the set temp was updated whenever the outside temperature changed.

OK, newb trying to duplicate what you guys have going on here. Seem to be struggling with something.

Just a couple known devices, their Integration, and their entities:

Thermostat: randk-downstairs-hvac-nativezone
Integration: Nexia/American Standard/Trane
Device ID: climate.randk_downstairs_hvac_nativezone

Weather Station: randk-ambient-weather-station
Thermostat: randk-ambient-weather-station_Temp
Integration: Ambient Weather Station
Device ID: sensor.weather_station_temp

Here’s the automation:

alias: randk-hvac-temp-weather
description: ‘’
trigger:

  • platform: time_pattern
    minutes: /5
    condition: []
    action:
  • service: climate.set_temperature
    data:
    hvac_mode: heat_cool
    target_temp_high: >-
    {{((-0.0625 * state_attr(‘weather.home’,‘temperature’)) + 76.0625) | round (0)}}
    target_temp_low: >-
    {{((-0.0625 * state_attr(‘weather.home’,‘temperature’)) + 66.0625.0) | round (0)}}
    target:
    entity_id: climate.randk_downstairs_hvac_nativezone
    mode: single

Here are the errors I am receiving:

Logger: homeassistant.components.automation.new_automation_5
Source: components/automation/init.py:519
Integration: Automation (documentation, issues)
First occurred: 7:14:31 PM (1 occurrences)
Last logged: 7:14:31 PM

Error while executing automation automation.new_automation_5: Error rendering data template: TypeError: state_attr() missing 1 required positional argument: ‘name’

Logger: homeassistant.components.automation.new_automation_5
Source: helpers/script.py:1397
Integration: Automation (documentation, issues)
First occurred: 7:14:31 PM (1 occurrences)
Last logged: 7:14:31 PM

randk-hvac-temp-weather: Error executing script. Error for call_service at pos 1: Error rendering data template: TypeError: state_attr() missing 1 required positional argument: ‘name’

Any help would be appreciated, thank you!

Can someone help me understand the purpose of this? Honestly. In my mind, the entire purpose of a thermostat is to make the house that temperature, regardless of the outdoor temperature. If it’s colder outside, the furnace just works harder to heat the house until the thermostat says it has reached the desired temperature. So… Under what circumstances would you need to adjust the thermostat higher based on the outdoor temp? If you want the house at 70, then set it at 70 and let the system work the way its designed. What am I missing?

2 Likes

I believe that this would be for two reasons.

The first being to save on energy consumption. If it’s 100 degrees outside, you don’t want the thermostat set to 68, like you might in the winter.

The second being of similar deduction is that if it’s 50 degrees outside, you will most likely be wearing heavier clothing and can keep the temperatures inside the house lower.

That doesn’t explain why OP wants to do what they said they are trying to do.

if you have an older large house, and the thermostat is in the middle, the extremities will be vastly different temperature than what the center is up to 10 degrees, rather than going through the hassle of getting sensors all over the house set up and programming them to give an average, this is easier.

OP did you ever figure this out, i have an automation set up in a similar way, but putting it into a blueprint is causing me a headache

I created a blueprint that does things a little differently, you input the temperatures you want based on the forecast. you just repeat making automations for different times of day.

Thermostat based on outdoor temperature - Blueprints Exchange - Home Assistant Community (home-assistant.io)