Turn off HVAC/thermostat when window/ door open

Pretty good blueprint!

Could you please consider expanding this so that the HVAC will be paused if the door/window sensor(s)group(s) are already opened when the HVAC device is turned on?

Hi!

This blueprint is lovely but seems a bit inconsistent for me. Maybe about half the time, this doesn’t turn my HVAC back on. It leaves it in the off position. I’m noticing it mostly when the door or windows have been open for a while. Is there some sort of a timeout either in Home Assistant or this automation?

Thanks!

Hey glad you like the idea of the automation. There is no timeout in either homeassistant or in the automation. Some possible scenarios that could cause the issue would be if you are restarting either homeassistant or whatever you have homeassistant running on while the HVAC system is in the ‘paused’ state. It will not pick up where it left off due to current limitations with the scene creation process in homeassistant.
The other possibility I could see is if your sensors don’t have the greatest connection and become unavailable while the HVAC system is in the ‘paused’ state. To possibly correct this scenario you could try to edit the code by going to the

- wait_for_trigger:

section towards the bottom and where it says

from: on
to: off

try deleting the part that says

from: on

If you decide to edit the code don’t forget to either reload the automations or just restart homeassistant.

Hope this helps you out.

1 Like

Is it possible to create 2 automations based on this blueprint for 2 different HVAC at home?
For what I see the scene_id is fixed, so when the second automation is triggered, if the other one is already triggered it tries to create the same scene_id so it doesn’t works.

It is possible to setup the scene_id name based on the HVAC entity that is controlling?

Thanks for the reply! I’m actually experiencing a slightly different issue now (and I’m not sure when it changed). This blueprint is, indeed, successfully stopping and restarting my HVAC but it’ll only return my ecobee to a permanent “hold” state, and not the comfort setting that it was set to before the automation occurred. Any ideas?

Thanks again! This is definitely one of my favorite automations I have going, even if just to turn the HVAC off.

Hey sorry for the late reply. I’m not terribly certain on if it is possible but I will definitely look into that. I like the idea.

Hey glad to hear it is working so I had the same issue but I was able to fix it using the ‘Resume Action’ built into the blueprint. In HA for ecobee there is a button press to ‘clear hold’. Using the ‘Resume Action’ I added in a ‘wait for trigger’ to look for when the ecobee goes ‘from off’ leaving the ‘to’ field blank and then an action after that which triggers the ‘clear hold’ button. The wait for trigger option is probably not necessary but it catches any issues if there is a slow down on the network. I also made the ‘continue on timeout’ option in the ‘wait for trigger’ action 5 seconds just to make sure it triggers. Once the ‘clear hold’ button is triggered your ecobee will resume the normal schedule.

Your suggestion has been implemented in version 1.5. Thank you for the idea! Let me know if you decide to use it how it works for you!

Thanks so much for the reply! This seems to be exactly what I’m looking for. However, I’m not seeing the “from off” field. Only Home, Away, and Sleep. Screenshot attached. Thanks again!

Update: I edited the YAML, so will test to see if that works. Thanks!!

I believe you are currently using the ‘select’ entity, you want the ‘climate’ entity, which is the ecobee itself, then you should have the ‘off’ option.
The device should be ‘climate.main_floor’ instead of ‘select.main_floor_current_mode’

1 Like

Awesome blueprint, and here’s a request: Add the ability to trigger extra actions immediately when the door opens (flash some lights, notify) and then if it stayed open for the entire delay run the already existing actions. Maybe have two triggers?

Would be nice if the climate entity gets adjusted while it’s still paused to cancel returning it to old state when it gets triggered by sensor being off. hope that makes sense. here’s an example: my ac was set to cool, then I opened a window and it got paused, while it was paused I have turned it on and set it to “fan” mode to improve air circulation. but when I close the window it goes back to cool mode, I’d rather keep it at “fan” to avoid confusion.

I have it already set to look at the status of the HVAC system to make sure it is off but checking it, the fan status apparently is not taken into account when determining if it is off. I can add in a line to verify the fan is in auto as well.
Sorry I have been away from this all for a while, been busy moving and I am just now getting all my automations restored.

I think the best way to achieve what you are looking for would be to manually edit some code. If you take this section:

action:
- service: scene.create
  data:
    scene_id: "{{ name_id }}"
    snapshot_entities: !input climate_device
- service: climate.set_hvac_mode
  target:
    entity_id: !input climate_device
  data:
    hvac_mode: 'off'
- choose:
  - conditions: '{{ pause_action is defined }}'
    sequence: !input pause_action

And re-order it as this:

action:
- choose:
  - conditions: '{{ pause_action is defined }}'
    sequence: !input pause_action
- service: scene.create
  data:
    scene_id: "{{ name_id }}"
    snapshot_entities: !input climate_device
- service: climate.set_hvac_mode
  target:
    entity_id: !input climate_device
  data:
    hvac_mode: 'off'

Your custom pause actions will happen before anything is changed. Doing this you can set up the blueprint pause delay to 0 and then create custom choose actions for your pause_action in the blueprint to do exactly as you described.

This is my first Blueprint added to my HA, and this is awesome. I really appreciate the work you’ve done with this one. I saw the comment where someone else had asked for a timeout where if the window is not closed after a certain amount of time, it requires manual input to the thermostat to turn it back on. This would be an amazing feature, but doesn’t make or break this blueprint.

Thank you for your feedback! Since there are multiple requests I’ll look into adding this as an optional selector.

1 Like