# Help needed - Window open climate off - using wildcards

**URL:** <https://discourse.nodered.org/t/help-needed-window-open-climate-off-using-wildcards/70236>\
**Category:** General\
**Created:** [8 November 2022 05:19 UTC](https://discourse.nodered.org/t/help-needed-window-open-climate-off-using-wildcards/70236 "2022-11-08T05:19:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![snickers2k](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snickers2k/32/70373_2.png) [@snickers2k](https://discourse.nodered.org/u/snickers2k)\
**Post date:** [8 November 2022 05:19 UTC](https://discourse.nodered.org/t/help-needed-window-open-climate-off-using-wildcards/70236/1 "2022-11-08T05:19:09Z")

</div>

Hey there.

I need your help.

What I’m trying to archive is to have a simple „window open, climate off automation“, but with one simple automation, using wildcards.

Everywhere I look around, people doing it all one by one - specifying every room, every window and every thermostat in single automations.  
Having an office, a brothers-home, a parents-home and an own Home makes things really annoying.

So basically taking the Area of a window-magnet to choose which Area to turn off the climate.  
Ideally restoring it’s old value after closing the window.  
And also ideally choosing the name from that window-magnet for the cover to open (if named the same), so let some fresh air in.

So I thought maybe you guys have done something like this already or maybe it’s interesting enough for you to build? 🙂

**Long story short**  
something like

If: window.{Bedroom\_Front} in area.{Bedroom} gets opened  
do: turn\_off climate in area.{Bedroom} and (if closed) open cover.{Bedroom\_Front} to 30%

thanks

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [8 November 2022 05:49 UTC](https://discourse.nodered.org/t/help-needed-window-open-climate-off-using-wildcards/70236/2 "2022-11-08T05:49:16Z")

</div>

OK you have not mentioned your environment - but i am guessing that with the terminology you have used - this is Home Assistant with the Node Red Add-on ?

If so i would suggest you would be better off on the Node-red subforum on the HA forum (in the third party section as they will be better able to integrate the answer into the HA environment.

There are only a couple of us on here who use HA very much at all

Craig

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [8 November 2022 10:38 UTC](https://discourse.nodered.org/t/help-needed-window-open-climate-off-using-wildcards/70236/3 "2022-11-08T10:38:08Z")

</div>

You leave out details, what nodes are you using what are their output messages, what are the input messages to open/close, turn on/ turn off. All this info will help people help you. Without it we are guessing, so an answer will probably not quite fit your actual needs

---

<div class="post-metadata">

**Author:** ![snickers2k](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/snickers2k/32/70373_2.png) [@snickers2k](https://discourse.nodered.org/u/snickers2k)\
**Post date:** [8 November 2022 18:21 UTC](https://discourse.nodered.org/t/help-needed-window-open-climate-off-using-wildcards/70236/4 "2022-11-08T18:21:31Z")

</div>

thank you guys.  
in home assistant a very nice fellow has made this flow, which works great so far

```auto
[{"id":"744b9f1935875b62","type":"server-events","z":"892eaca92f0b4509","name":"","server":"","version":2,"eventType":"state_changed","exposeToHomeAssistant":false,"eventData":"{\"new_state\": {\"state\": \"on\", \"attributes\": { \"device_class\": \"window\"}}}","haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"$outputData(\"eventData\").event.new_state","valueType":"jsonata"},{"property":"template","propertyType":"msg","value":"\"{{ area_id('\" & $outputData(\"eventData\").entity_id & \"')}}\"","valueType":"jsonata"}],"event_type":"","x":244,"y":1104,"wires":[["ca4b9b28e27c1efd"]]},{"id":"ca4b9b28e27c1efd","type":"api-render-template","z":"892eaca92f0b4509","name":"get entities for area","server":"","version":0,"template":"","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":454,"y":1104,"wires":[["39633f7c67c42b88","eb0b34b5c95576b3"]]},{"id":"39633f7c67c42b88","type":"api-call-service","z":"892eaca92f0b4509","name":"turn off climate","server":"","version":5,"debugenabled":false,"domain":"climate","service":"turn_off","areaId":["{{payload}}"],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":672,"y":1104,"wires":[[]]},{"id":"eb0b34b5c95576b3","type":"api-call-service","z":"892eaca92f0b4509","name":"open covers","server":"","version":5,"debugenabled":false,"domain":"cover","service":"set_cover_position","areaId":["{{payload}}"],"deviceId":[],"entityId":[],"data":"{\"position\": 30}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":662,"y":1152,"wires":[[]]}]

```

> **[Help needed - window open climate off - using wildcards](https://community.home-assistant.io/t/help-needed-window-open-climate-off-using-wildcards/485946)**
>
> Hey there. I need your help. What I’m trying to archive is to have a simple node-red „window open, climate off automation“, but with one simple automation, using wildcards. Everywhere I look around, people doing it all one by one - specifying...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 January 2023 18:21 UTC](https://discourse.nodered.org/t/help-needed-window-open-climate-off-using-wildcards/70236/5 "2023-01-07T18:21:35Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
