Window open, climate off

I grab your Creation and implemented a Condition. the condition is that if the Climate unit is actually turned off, this automation will not start the climate.
In this particular case for MELCLOUD systems. This is important because each climate unit has its own state names. if you want to find out about yours just go to DEveloper Tools and write the name of the entity. this will show you the state atributes.

  name: Window open, climate off after a defined time4
  description: An automation that turns off your climate device for exmple a heater
    or an air conditioning if a window sensor is open for a specific time. It waits
    until the window is closed again in order to turn the climate entity on again.
  domain: automation
      name: Window Sensor
      description: The window sensor that controls the climate entity.
          domain: binary_sensor
          device_class: door
      name: Miniumum time the window is open
      description: Time in seconds to wait until the automation is triggered
      default: 12
          min: 0.0
          max: 120.0
          unit_of_measurement: seconds
          step: 1.0
          mode: slider
      name: Climate Device
      description: The climate entity that is controlled by the window sensor.
          domain: climate
      name: Climate Device
      description: I Unit has a State by melcloud operate.
          domain: climate
- platform: state
  entity_id: !input 'window_entity'
  to: 'on'
  for: !input 'minimum_open_time'
- condition: state
  entity_id: !input 'condition_target'
  - 'heat'
  - 'dry'
  - 'cool'
  - 'fan_only'
  - 'heat_cool'
- service: climate.turn_off
  entity_id: !input 'climate_target'
- wait_for_trigger:
  - platform: state
    entity_id: !input 'window_entity'
    to: 'off'
  continue_on_timeout: false
- service: climate.turn_on
  entity_id: !input 'climate_target'
1 Like

Hi, I do not get your point at the moment. Is it some “Melcloud” specific behavior, and it is working for you now?
Do I have to choose the same climate (device) in your modified version of the blueprint?
Bildschirmfoto 2021-03-24 um 08.08.28
Why are you not using the “!input climate_target” as it is literally the same climate device as condition-target?
What is meant by “I unit” - what is the difference between the normal “state” of a climate device versus the state of a “melcloud” climate entity?

Why have you changed the device class to door instead of window?

Thanks in advance for your answers!

Hello :slight_smile:

Ahh, yes, about the device Class. For me to find the Z-wave Window and Door Sensor I had to change that device Class. Or I would not find it. I could also leave it in blank and it would show me all entities. I can change it back to yours or to all entities if you wish. But i am sure you can do it as well, since you created this one.

About the MELCLOUD, this is only for the Condition Part. I am still new to this, so this was the best way I could find for my CONDITION to work. As explained before, your Automation for me didnt work, because here in Portugal we dont need Climate always on, because we have times of the year that the temperature is just right, so if if the AC unit was off at the moment that I would open the Window , once I would close the window, it would start the climate, and we dont want that.
So for me to be able to use your automation and only triger if the actual climate unit was ON, I had to create a condition that would say, only trigger if you see these states

  • ‘heat’
  • ‘dry’
  • ‘cool’
  • ‘fan_only’
  • ‘heat_cool’
    These are all the states that my Climate unit works with. I stated this because maybe your units have other diferent states.
    So if the state of the Climate unit was OFF, then the automation would not start.
    For this contition to work, yes you must use the same unit. because thats the unit that you want to control or not.
    the condition sees if the targeted unit is on or not.

Does this make any sense?

Hi! Yes, now it makes perfectly sense! The automation/blueprint should only run if the climate device is running. I have added a condition that checks if the entity is not off (so any climate state is accepted)! Check “condition” documentation here. That feature should have been included right from the beginning. Thank you for giving me the hint for the real life corner case! I was travelling to Spain (Andalucia) for the last 7 years and a lot of people have this kind of climate device! Greetings to Portugal and the sea!!!

p.s.: If you change the device class of your door/window sensor to window it shows up in the blueprint

1 Like

Good Day,
first of all thanks for all the work done so far, really appreciate it!!
I am trying to use this Blueprint with my Homematic Door/Window Sensor and it does not work. What information can I provide for debugging?
First notice I can not select the sensor from the list I have to enter it manual.

Check the device class in the developer tools. The device class is limited to window only. You can change it by following these instructions.

@duesseldorferjung Here you find the German version as well as a version for a blueprint that accepts all kinds of binary-sensors. You can manually import the Github URL to your Blueprints.

@Soccs and all the others who have problems with the device class window you can find here the blueprint that accepts all kinds of Home Assistants binary sensors.

1 Like

or if you want to cheat it… :slight_smile:

domain: binary_sensor
device_class: door

remove the line that says domain and device_ class From your blueprint

Thanks for the quick response.
I did take the blueprint with the binary sensor and for some reason it does not trigger. Any ideas what to check? I can see that the sensor is reacting.

Have you waited until the set delay time is reached? Set it to 0 if you want to see direct results!

Have you reloaded the automations or restarted home assistant ?

All answers are yes.

Thanks for sharing this blueprint with us.
It did not work initially for me.
After some investigation, I made it work by replacing the condition attribute hvac_action by hvac_modes into the blueprint.
None of my climate entities have hvac_action as attribute.
I have not checked whether it screws the pinciple of the condition completely yet.
Hope it helps

Interesting - Thank you for sharing your experience! What climate entity are you using?
@duesseldorferjung Maybe that is the same problem with your device

I am not sure what kind of answer you expect.
I have Eurotronic Spirit Zwave using Zwave2MQTT (integrated in Zwave JS directly, not using MQTT)

here is the full state:

  - 'off'
  - heat
min_temp: 7
max_temp: 35
  - none
  - Energy heat
  - Full power
current_temperature: 18.8
temperature: null
preset_mode: none
friendly_name: 'Radiateur_Salle_de_bain: Thermostat mode'
supported_features: 17

After a quick test, I can confirm that the condition is skipped though.
If I manually set my TRV to off, then open the window, wait a bit and close it up; the TRV goes back to heating

Yes, you are right - not every climate.entity has a hvac mode! I have updated the blueprint so that it checks for the state (without looking for a specific attribute!). It would be great if you can give me feedback if this modification still works for you and melcloud @Soccs - thanks in advance.

ill try it tomorrow or today. thank you

Confirmed working!
Thanks for fixing it quickly

That’s a first time I try a blueprint, and it’s good so far.
an improvement, I would expect is definitely a sort of store, where you can update notifications and so on.

I would assume that it is not the same problem since the automation itself is not even triggered. The update you did, did you also do that on the version where all binary sensors can be selected?

Here you can find my statement about notifications. I am open for brainstorming as notifications is a very convenient functions in a smart environment.

That is exactly what @NicoLeOca experienced!

Any feedback of your Homematic system would have been helpful! As there was no further complain I assume it is working now and I also have updated all the other versions, too.

Happy Easter :rabbit:

Happy Easter to you as well.

As it is a public holiday over here I did find a bit of time to play around.

First of all fun fact, at some point I got really confused because I had deleted everything from HA and all of a sudden when I opened my window my heater went off and even showed a window symbol in the display. After reading the manual today turns out the homematic unit has a built in feature to notice high temperature variances and turns off. Anyways I deactivated that feature.

I tried the hint from @NicoLeOca and it did not have an effect. After removing all conditions opening the windows turned off the climate as designed. Closing the window did not have an effect.

Calling the climate.turn_on service manual I did notice there is no effect at all. Only calling the climate.set_temperature seems to have an effect.

Is there a possibility to safe the “old” target temperature somewhere and then set it once the window is closed?