How to collect status of specific entities and take action if they're all the same status or no action if they're in a conflicting status?

Hello all - first of all, I’d like to say that I’ve recently migrated from SmartThings and WebCore. WebCore has a plethora of easy to use if/else statements, so I’ve come from this perspective and have been struggling some.

I’ve been working on my Thermostat logic. The goal is this: if any windows open up, turn off the thermostats. If any doors open up, wait 150 seconds and then re-evaluate to see if the thermostats should turn off or if the doors were closed, then do nothing. When everything is closed, turn the thermostats back on.

Everything works except for one thing (and I’ll be specific here to help with the t/s): when I open the bedroom window, the air turns off. When I open the bathroom window, the air stays off. When I close the bathroom window, the air turns back on. The bedroom window is still open and the air should still be turned off.

I used the Get Entities node from the writeup that @Kermit did, and it was FANTASTIC. I was able to poll for all of the entities that are either open or closed, but now, how do I take action? I need node-red to turn the thermostats on when everything is closed, but keep them off if even one device is reporting open.

I can provide the code or screenshots if necessary, but I’m going to warn you, it’s probably embarrassing!

A solution would be to make a group for all the window sensors in HA. Then you can check the state of the group. If it’s on at least one window is open and if it’s off all the windows are closed.

@Kermit, that was it - far simpler solution than I expected.

I had to use a trigger: state node though, when I tried the current state node, it wouldn’t read the change. The trigger state has a redundant configuration (was on && now off), but it works!

Thank you for the assistance.

@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:

  1. If I open a window and then a door, no issues, because the thermostats are already off.
  2. If I close the door first, it’s fine, the window is still open. Thermostats stay off.
  3. If I open a door, the timer is ignored, It immediately evaluates the group that something is open and skips the timer.
  4. 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"}]

Assumes you have two groups group.all_doors and group.all_windows. There might be some holes in the logic can’t really test it.

[{"id":"ed4e52b9.d3225","type":"server-state-changed","z":"b4c78428.8b7a28","name":"Windows","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.all_windows","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":92,"y":192,"wires":[["ba8f6b24.83b5b8"],["39858a07.ca5a46"]]},{"id":"ba8f6b24.83b5b8","type":"api-call-service","z":"b4c78428.8b7a28","name":"Turn off the thermostats","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":590,"y":192,"wires":[[]]},{"id":"d6ee7102.87d83","type":"api-call-service","z":"b4c78428.8b7a28","name":"Turn on the thermostats","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":590,"y":240,"wires":[[]]},{"id":"e4506b10.7e3df8","type":"ha-wait-until","z":"b4c78428.8b7a28","name":"","outputs":2,"entityId":"binary_sensor.sliding_door_open_status","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"150","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":332,"y":48,"wires":[[],["ba8f6b24.83b5b8"]]},{"id":"19117743.ec2619","type":"ha-wait-until","z":"b4c78428.8b7a28","name":"","outputs":2,"entityId":"binary_sensor.garage_entry_door_open_close","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"150","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":332,"y":96,"wires":[[],["ba8f6b24.83b5b8"]]},{"id":"8b4998b3.20e398","type":"ha-wait-until","z":"b4c78428.8b7a28","name":"","outputs":2,"entityId":"binary_sensor.front_door_ias_zone","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"150","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":332,"y":144,"wires":[[],["ba8f6b24.83b5b8"]]},{"id":"28e82776.381ae8","type":"trigger-state","z":"b4c78428.8b7a28","name":"Sliding Door open?","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"binary_sensor.sliding_door_open_status","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"pdtzwjwkvsp","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":122,"y":48,"wires":[["e4506b10.7e3df8"],[]]},{"id":"f38c7aa0.679cf8","type":"trigger-state","z":"b4c78428.8b7a28","name":"Garage Entry Door Open?","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"binary_sensor.garage_entry_door_open_close","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"h0hl83x1tet","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":142,"y":96,"wires":[["19117743.ec2619"],[]]},{"id":"bf2b3cc8.deede","type":"trigger-state","z":"b4c78428.8b7a28","name":"Front Door Open?","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"binary_sensor.front_door_ias_zone","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"krj2wzzjy9g","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":122,"y":144,"wires":[["8b4998b3.20e398"],[]]},{"id":"39858a07.ca5a46","type":"api-current-state","z":"b4c78428.8b7a28","name":"No Door Open?","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"group.all_doors","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":352,"y":240,"wires":[["d6ee7102.87d83"],[]]},{"id":"3509ad56.5f4032","type":"trigger-state","z":"b4c78428.8b7a28","name":"Door Closed","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"group.all_doors","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"rs507wabl2d","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off"},{"id":"l420wiq2yxg","targetType":"entity_id","targetValue":"group.all_windows","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":342,"y":288,"wires":[["d6ee7102.87d83"],[]]}]

@Kermit, thank you, this was a very humbling lesson. Your provided code works perfectly- at least in the circumstances I tested.

I think the part that’s been confusing me is the nodes that can accept inputs on ports. I didn’t realize this was an optional input, at least for some of them. I see now that the triggers have two inputs - a trigger and a port.

At any rate, I appreciate your effort with this immensely. Hopefully, this knowledge will carry over to the other flows I still need to create.

Thanks!