So I can’t use home zone as the contents of the group.home_mode_people is all input_text sensors. Reason for that is I’ve expanded location detection to include things like driving, just arrived home, ect. I’m also tracking people with different techniques so I need more flexibility.
Here is the full flow.
[{"id":"c7eb480c895880cf","type":"comment","z":"b22a85d2.2d8ae8","name":"Home / Away Logic","info":"","x":130,"y":1280,"wires":[]},{"id":"ddfc9f4838682891","type":"server-state-changed","z":"b22a85d2.2d8ae8","name":"C Home?","server":"3413715.387508e","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_text.c","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":1400,"wires":[["c7f591beb59b4c1e"]]},{"id":"53de2281d932c0e5","type":"server-state-changed","z":"b22a85d2.2d8ae8","name":"M Home?","server":"3413715.387508e","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_text.m","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":122,"y":1465,"wires":[["c7f591beb59b4c1e"]]},{"id":"c10d299a131b963b","type":"server-state-changed","z":"b22a85d2.2d8ae8","name":"E Home?","server":"3413715.387508e","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_text.e","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":122,"y":1525,"wires":[["c7f591beb59b4c1e"]]},{"id":"847f8d21140e51c1","type":"api-call-service","z":"b22a85d2.2d8ae8","name":"Home Mode: Home","server":"3413715.387508e","version":5,"debugenabled":false,"domain":"input_select","service":"select_option","areaId":[],"deviceId":[],"entityId":["input_select.home_mode"],"data":"{\"option\":\"Home\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1400,"wires":[[]]},{"id":"b018afcce83c6621","type":"api-call-service","z":"b22a85d2.2d8ae8","name":"Home Mode: Away","server":"3413715.387508e","version":5,"debugenabled":false,"domain":"input_select","service":"select_option","areaId":[],"deviceId":[],"entityId":["input_select.home_mode"],"data":"{\"option\":\"Away\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":1500,"wires":[[]]},{"id":"4ecc85656f4e9cf7","type":"api-current-state","z":"b22a85d2.2d8ae8","name":"No Guests?","server":"3413715.387508e","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.house_guests","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":612,"y":1505,"wires":[["980031a0aa3b7d0d"],[]]},{"id":"c7f591beb59b4c1e","type":"switch","z":"b22a85d2.2d8ae8","name":"(Just Arrived) Home","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Home","vt":"str"},{"t":"eq","v":"Just Arrived Home","vt":"str"},{"t":"eq","v":"payload","vt":"msg"}],"checkall":"false","repair":false,"outputs":3,"x":400,"y":1420,"wires":[["847f8d21140e51c1"],["847f8d21140e51c1"],["4ecc85656f4e9cf7"]]},{"id":"99b14109e828e455","type":"server-state-changed","z":"b22a85d2.2d8ae8","name":"T Home?","server":"3413715.387508e","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_text.t","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":1340,"wires":[["c7f591beb59b4c1e"]]},{"id":"980031a0aa3b7d0d","type":"ha-get-entities","z":"b22a85d2.2d8ae8","name":"Count Home in Home Mode People","server":"3413715.387508e","version":0,"rules":[{"property":"state","logic":"includes","value":"Just Arrived Home, Home","valueType":"str"},{"property":"entity_id","logic":"in_group","value":"group.home_mode_people","valueType":"str"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":840,"y":1500,"wires":[["58b33d4434bc4faa"]]},{"id":"58b33d4434bc4faa","type":"switch","z":"b22a85d2.2d8ae8","name":"is 0?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1050,"y":1500,"wires":[["b018afcce83c6621"]]},{"id":"3413715.387508e","type":"server","name":"Home Assistant ACME","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"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}]
Even if I try and do a count for just the entity_id in group group.home_mode_people
I get no results even though there are entities in that group.