@Kermit, I take back my previous statement. It’s almost good. I thought I had it completely resolved this morning, but no joy. This is what I tried and what’s happening instead;
- I configured a group that had the doors and windows open/close status together. When I do this, the timers on the doors no longer work, when opening a door, as the evaluation jumps immediately to “something open” and turns off the thermostats.
- I removed doors from the doors and windows group. Now, doors and windows operate independently. This is not good because if I have a window open and open/close a door, then the thermostat turns back on. Undesired behavior.
- I toyed with the current state node, but it appears to not be re-read when something changes.
Order of operation on opening/closing devices also seems to be a factor:
- If I open a window and then a door, no issues, because the thermostats are already off.
- If I close the door first, it’s fine, the window is still open. Thermostats stay off.
- If I open a door, the timer is ignored, It immediately evaluates the group that something is open and skips the timer.
- If I open a window at this point, then all is fine because the thermostats are already off.
I’ve included my json to help evaluate, if you don’t mind. Again, the ultimate goal is to turn off the thermostats if a door or window are open, unless it’s only a door (or combination of doors) for 150 seconds or less. Be gentle, I’m still learning.
[{"id":"6bd66ba2.51fa34","type":"tab","label":"Tstat automation","disabled":false,"info":""},{"id":"bf2c7a59.3b51d8","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Computer Window Open? ","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.computer_window_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":187.00003051757812,"y":32.00002932548523,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"294ff4ff.3863cc","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Bathroom Window Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.bathroom_window_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":187.00003051757812,"y":92.00002932548523,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"8ff277ab.1fb348","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Ben Room Window Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.ben_room_window_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":187.00003051757812,"y":152.00002932548523,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"f07bd41d.de8ab8","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Luke Room Window Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.luke_room_window_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":197.00003051757812,"y":212.00002932548523,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"d1bab92e.c0a958","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Bedroom Small Window Left Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.bedroom_small_window_left_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":217.00003051757812,"y":272.00002932548523,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"8145483e.186088","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Bedroom Small Window Right open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.bedroom_window_small_right_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":217.00003051757812,"y":332.00002932548523,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"1a44161e.49882a","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Bedroom Window Left Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.bedroom_window_left_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":197.00003051757812,"y":392.00002932548523,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"27ebb05e.83e41","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Bedroom Window Right Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.bedroom_window_right_open_status","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":207.00003051757812,"y":452.00002932548523,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"32865b65.a76e24","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Play Room Window Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.play_room_window_open_status","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":187.00003051757812,"y":512.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"114db089.04cc8f","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Family Room (Small Window Left) Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.family_room_small_window_left_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":237.00003051757812,"y":572.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"fb9b900.7d1b17","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Family Room (Small Window Right) Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.family_room_small_window_right_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":237.00003051757812,"y":632.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"e239be71.23db6","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Family Room (Window Left) Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.family_room_window_left_open_status","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":217.00003051757812,"y":692.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"df5db5e1.2915b8","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Family Room (Window Right) Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.family_room_window_right_open_status","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":217.00003051757812,"y":752.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"81cb4cdc.8101d","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Dining Room Window Left Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.dining_room_window_left_open_status","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":207.00003051757812,"y":812.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"3ca33ded.eddc82","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Dining Room Window Right Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.dining_room_window_right_open_status","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":217.00003051757812,"y":872.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"8655bb7.f31b548","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Dining Room Window Side","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.dining_room_window_side_ias_sensor","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":187.00003051757812,"y":932.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"ad25e049.12c57","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Living Room Window Left open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.living_room_window_left_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":207.00003051757812,"y":992.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"8e8e06ea.e55128","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Living Room Window Right open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.living_room_window_right_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":217.00003051757812,"y":1052.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"3221275b.721608","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Living Room Window Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.living_room_window_open_status","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":197.00003051757812,"y":1112.0000293254852,"wires":[["f619e394.54988"],["841831fa.3611c"]]},{"id":"b5b52a69.499818","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Garage Entry Door Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.garage_entry_door_open_close","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":190,"y":1360,"wires":[["ac1dc1ac.7c66c"],["bdfffba9.dd4e08"]]},{"id":"cbdaf1a8.2ba23","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Front Door Open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.front_door_ias_zone","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":176,"y":1489,"wires":[["9a593857.2ab388"],["5c4da4a8.fc7dfc"]]},{"id":"bdfffba9.dd4e08","type":"api-current-state","z":"6bd66ba2.51fa34","name":"Garage Entry Door now closed?","server":"84a8d823.e15248","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.garage_entry_door_open_close","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":816,"y":1369,"wires":[["841831fa.3611c"],["4a4f45e9.0a5d9c","f619e394.54988"]]},{"id":"5c4da4a8.fc7dfc","type":"api-current-state","z":"6bd66ba2.51fa34","name":"Front Door now closed?","server":"84a8d823.e15248","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.front_door_ias_zone","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":802,"y":1498,"wires":[["841831fa.3611c"],["8d2754bc.001fb8","f619e394.54988"]]},{"id":"ac1dc1ac.7c66c","type":"stoptimer","z":"6bd66ba2.51fa34","duration":"10","units":"Second","payloadtype":"str","payloadval":"STOP","name":"Are we just going in and out?","x":546,"y":1289,"wires":[["bdfffba9.dd4e08"],[]]},{"id":"4a4f45e9.0a5d9c","type":"change","z":"6bd66ba2.51fa34","name":"STOP","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":316,"y":1289,"wires":[["ac1dc1ac.7c66c"]]},{"id":"9a593857.2ab388","type":"stoptimer","z":"6bd66ba2.51fa34","duration":"10","units":"Second","payloadtype":"str","payloadval":"STOP","name":"Are we just going in and out?","x":546,"y":1415,"wires":[["5c4da4a8.fc7dfc"],[]]},{"id":"8d2754bc.001fb8","type":"change","z":"6bd66ba2.51fa34","name":"STOP","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":316,"y":1415,"wires":[["9a593857.2ab388"]]},{"id":"ac5248eb.d03028","type":"server-state-changed","z":"6bd66ba2.51fa34","name":"Sliding Door open?","server":"84a8d823.e15248","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.sliding_door_open_status","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":170,"y":1220,"wires":[["d5d94197.141ab"],["ce48ea05.8462a8"]]},{"id":"d5d94197.141ab","type":"stoptimer","z":"6bd66ba2.51fa34","duration":"5","units":"Second","payloadtype":"str","payloadval":"","name":"Are we just going in and out?","x":540,"y":1140,"wires":[["ce48ea05.8462a8"],[]]},{"id":"d187b13e.13015","type":"api-call-service","z":"6bd66ba2.51fa34","name":"Turn on the thermostats","server":"84a8d823.e15248","version":1,"debugenabled":false,"service_domain":"climate","service":"turn_on","entityId":"climate.ecobee_down, climate.ecobee_up","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1710,"y":660,"wires":[[]]},{"id":"f619e394.54988","type":"api-call-service","z":"6bd66ba2.51fa34","name":"Turn off the thermostats","server":"84a8d823.e15248","version":1,"debugenabled":false,"service_domain":"climate","service":"turn_off","entityId":"climate.ecobee_down, climate.ecobee_up","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1630,"y":840,"wires":[[]]},{"id":"ce48ea05.8462a8","type":"api-current-state","z":"6bd66ba2.51fa34","name":"Sliding door now closed? ","server":"84a8d823.e15248","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.sliding_door_open_status","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":770,"y":1240,"wires":[["841831fa.3611c"],["2afdfba2.10e714","f619e394.54988"]]},{"id":"2afdfba2.10e714","type":"change","z":"6bd66ba2.51fa34","name":"STOP","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":1160,"wires":[["d5d94197.141ab"]]},{"id":"841831fa.3611c","type":"trigger-state","z":"6bd66ba2.51fa34","name":"Is anything still open? ","server":"84a8d823.e15248","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"group.all_doors_windows","entityidfiltertype":"exact","debugenabled":true,"constraints":[{"id":"8qyhgqz8gi3","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off"},{"id":"q5dkl9dvgq","targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":1240,"y":340,"wires":[["d187b13e.13015"],["f619e394.54988"]]},{"id":"84a8d823.e15248","type":"server","z":"","name":"Home Assistant"}]