hey there.
although this is really great work @SmartLiving.Rocks
since this still involves specifying every room, every window and every thermostat - all in single automations, i think this whole window/climate problem needs a more out-of-the-box approach using wildcards.
in this threat, a nice fellow came up with a real short and great solution
this works out of the box for every window and room. no matter what manufacturer.
but like kermit said
“This is assuming you have an area set for each device/entity and the all the windows sensors have their device_class
set to window.”
[{"id":"59c7f851f774ae47","type":"tab","label":"Global Window Open","disabled":false,"info":"","env":[]},{"id":"744b9f1935875b62","type":"server-events","z":"59c7f851f774ae47","name":"Window Opened","server":"bae62b83.87c628","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":245,"y":220,"wires":[["ca4b9b28e27c1efd"]]},{"id":"ca4b9b28e27c1efd","type":"api-render-template","z":"59c7f851f774ae47","name":"get entities for area","server":"bae62b83.87c628","version":0,"template":"","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":475,"y":220,"wires":[["39633f7c67c42b88","92dc067bd4f2369b"]]},{"id":"39633f7c67c42b88","type":"api-call-service","z":"59c7f851f774ae47","name":"turn off climate","server":"bae62b83.87c628","version":5,"debugenabled":false,"domain":"climate","service":"turn_off","areaId":["{{payload}}"],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":693,"y":220,"wires":[[]]},{"id":"8bb71ad5d4996322","type":"server-events","z":"59c7f851f774ae47","name":"Window Closed","server":"bae62b83.87c628","version":2,"eventType":"state_changed","exposeToHomeAssistant":false,"eventData":"{\"new_state\": {\"state\": \"off\", \"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":250,"y":485,"wires":[["684756f832d6aa4f"]]},{"id":"684756f832d6aa4f","type":"api-render-template","z":"59c7f851f774ae47","name":"get entities for area","server":"bae62b83.87c628","version":0,"template":"","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":470,"y":485,"wires":[["4540aff8a2bb80e3","a9612e0bfd6c82b5"]]},{"id":"4540aff8a2bb80e3","type":"api-call-service","z":"59c7f851f774ae47","name":"turn off climate","server":"bae62b83.87c628","version":5,"debugenabled":false,"domain":"climate","service":"turn_on","areaId":["{{payload}}"],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":708,"y":485,"wires":[[]]},{"id":"78dd80c123f6f2c9","type":"api-call-service","z":"59c7f851f774ae47","name":"open covers","server":"bae62b83.87c628","version":5,"debugenabled":false,"domain":"cover","service":"close_cover","areaId":["{{payload}}"],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":560,"wires":[[]]},{"id":"a2a04479af5713ba","type":"api-call-service","z":"59c7f851f774ae47","name":"open covers","server":"bae62b83.87c628","version":5,"debugenabled":false,"domain":"cover","service":"set_cover_position","areaId":["{{payload}}"],"deviceId":[],"entityId":[],"data":"{\"position\": 10}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":285,"wires":[[]]},{"id":"92dc067bd4f2369b","type":"api-current-state","z":"59c7f851f774ae47","name":"is night?","server":"bae62b83.87c628","version":3,"outputs":2,"halt_if":"below_horizon","halt_if_type":"str","halt_if_compare":"is","entity_id":"sun.sun","state_type":"str","blockInputOverrides":true,"outputProperties":[],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":635,"y":325,"wires":[["a2a04479af5713ba"],[]]},{"id":"a9612e0bfd6c82b5","type":"api-current-state","z":"59c7f851f774ae47","name":"is night?","server":"bae62b83.87c628","version":3,"outputs":2,"halt_if":"below_horizon","halt_if_type":"str","halt_if_compare":"is","entity_id":"sun.sun","state_type":"str","blockInputOverrides":true,"outputProperties":[],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":685,"y":560,"wires":[["78dd80c123f6f2c9"],[]]},{"id":"bae62b83.87c628","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]
this shows how easy it can be, and i think is more the way smart-home should be today.
a blueprint without node-red using this approach would be of course awesome, but i am more comfortable with node-red