Another Heating Control

My Home Assistant

With this blueprint we take over your heating.
You can set a minimum temperature value, If the
temperature is below this value it checks if somebody is home, And if that’s true
it will start heating to the value you set in the target temperature setting.

And you can set a time range, So that the climate device won’t start heating in the middle off the night.

Github Gist: https://gist.github.com/r3mcos3/5908a49fac1ea2e5332ae13ad2cd6fb3

blueprint:
  name: Heating Control
  description: Control your heating with options for person home, if temp is below a specific value, set temp, and heating between specific times.
  domain: automation
  input:
    heating:
      name: Climate Device
      description: The climate device to use.
      selector:
        entity:
          domain: climate
    temp_sensor:
      name: Temperature Sensor
      description: Temperature Sensor to check.
      selector:
        entity:
          domain: sensor
          device_class: temperature
    person1:
      name: Person 1
      description: The first person that has to be home.
      default: []
      selector:
        entity:
          domain: person
    person2:
      name: Person 2
      description: The second person that has to be home.
      default: []
      selector:
        entity:
          domain: person
    min_temp:
      name: Minimum Temp
      description: If temperature is below this value and someone is home, It turns heating on.
      default: 15
      selector:
        number:
          min: 15
          max: 25
          step: 1
          mode: slider
    set_temp:
      name: Temperature Target
      description: If the heating turns on, It heats to this target temperature.
      default: 20
      selector:
        number:
          min: 15
          max: 25
          step: 1
          mode: slider
    time_after:
      name: Time After
      description: After this time the heating turns on, so it's warm in the morning
      default: '07:30:00'
      selector:
        time:
    time_before:
      name: Time Before
      description: After this time the heating turns off, This to prevent the heating is on in the middle of the night
      default: '21:30:00'
      selector:
        time:

variables:
  set_temp: !input set_temp

trigger:
  - platform: homeassistant
    event: start
  - platform: event
    event_type: automation_reloaded
  - platform: time_pattern
    minutes: /10

action:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: !input 'temp_sensor'
            below: !input min_temp
          - condition: time
            before: !input 'time_before'
            after: !input 'time_after'
          - condition: or
            conditions:
              - condition: state
                entity_id: !input 'person1'
                state: home
              - condition: state
                entity_id: !input 'person2'
                state: home
        sequence:
          - service: climate.set_temperature
            data:
              entity_id: !input 'heating'
              hvac_mode: heat
              temperature: "{{ set_temp }}"
    default:
      - service: climate.turn_off
        data:
          entity_id: !input 'heating'

mode: single

5 Likes

Possible to add an option to have person 1 OR person 2 to be at home? Currently if I am out and wife is at home the heating defualts to off!

1 Like

if you look at the code, You shall see its an OR condition.

Strange. My Nest kept turning off depite the fact my wife was at home while I was out.

Nice!
Would this work nicely with Tado TRV’s, the radiator valve?

I’m using it with tado, and it’s working great.

2 Likes

Great blueprint. But would be nice to also have instead of person 1 or 2, a switch input boolean.
Because I have a home presence sensor that when detects motion for more than x minutes then it turns on that input boolean, and that acts as a general presence instead of person

Thank you very much for you blueprint. Is it possible to add the function, that when the climates turns off in example 23:00 to set a min. temperature for the room when the heating turns off?

Example:

  • climate turns off at 23:00
  • In the night the room temperature goes down to 16
  • climate turns on and heat the room to 17

Thanks :+1:

Your free to do with the blueprint what you want,
And modify it to your needs. :hammer_and_wrench:

@Miguel_Queiroz
@isibizi

Forked it to use 0.2 step for the heat instead of 1. 1 is a lot when dealing in Celsius!

1 Like

Great your used the blueprint and making it your own.
But be aware that not all climate device accept that little steps, I know my tado device only accept 0.5 steps.

but enjoy your blueprint :+1:

My Tado temperature sensor is not in the list to read the temp from. Only my Hue Motion Sensor temperatures are in the list but because they hang up high on the ceiling they are cooler.

Can you add the Tado temperature sensors from the valves in the list of “Temperature sensor to check”?

One problem I have with it is:

  • My Nest goes into an Off state when not heating.
  • This automation fails to set it to Heating when I come home or the temp drops below the value of set_temp. It stays in Off state.

I’ll keep digging as I am sure this is a Nest specific issue.

I have zero issue’s and it’s working like a champ

your free to do what you want with the blueprint, i’m not going to modify the blueprint because if i have to modify it by each request than it’s not working for me!

Ok, in my case, heating to work for Nest devices, I had to first set preset_mode to ‘none’. E.g.

My updated Blueprint is here:

and I have an additional “leaving home” automation to enable eco mode as follows:

- alias: Nest Eco When Away    
  trigger:
    - platform: state
      entity_id: group.family
      from: 'home'
      to: 'not_home'
      for:
        minutes: 10
 
  action:
    - service: climate.set_preset_mode
      data:
        entity_id: climate.nest
        preset_mode: 'eco'
    - service: notify.mobile_app_my_phone
      data:
        title: "Nest Set to Eco"
        message: "Home is in Eco heating mode."
1 Like

Nice blueprint, thanks!
But what about negative “Minimum Temp”?
I live in Siberia :slight_smile:

@r3mcos3 thank you your work.
I have a question, if its ok

Can I do multiple settings for 1 room?
Example In tado app I have a smart schedule for my bedroom :;
0:00 h to 18:30 20C
18:30 to 22:15 24C
22:15 to 0:00 22C

I think its possible with time after and time before options if I do multiple automations for 1 room.
What do you think?

I don’t know if it’s working with minus temps, the minimum is 15 degrees Celsius everything below that will trigger it

I think you have to set it up in 3 separate automations using this template