Presence sensor booleans

Hello,
I am a total newbie and just started using home assistant and node red. I am trying to get some booleans going were if at least one person home the home boolean is toggled on, and if no one is home toggle off the home boolean. I want to use the home boolean for future home automation. most of it seems to be working except for the home toggle turning back on after it is off, also is this the best way or am I making way more work then it needs to be. Any help or suggestions is greatly appreciated.

`[{"id":"bddbed6b.c9ee5","type":"tab","label":"Home status","disabled":false,"info":""},{"id":"9deccbc5.1d0fa8","type":"server-state-changed","z":"bddbed6b.c9ee5","name":"J Home","server":"45bd2b8d.85fc14","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"device_tracker.life360_jason","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":50,"y":20,"wires":[["3089eeba.142b32"],["6c85e76e.b48018"]]},{"id":"3089eeba.142b32","type":"api-call-service","z":"bddbed6b.c9ee5","name":"Jason Home","server":"45bd2b8d.85fc14","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.jasonhome","data":"","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":270,"y":20,"wires":[["edfb39d.5c357c8"]]},{"id":"6c85e76e.b48018","type":"api-call-service","z":"bddbed6b.c9ee5","name":"Jason away","server":"45bd2b8d.85fc14","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.jasonhome","data":"","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":270,"y":60,"wires":[["60a4ac7b.151054","72f85e95.694c3","ff307fda.d9d78"]]},{"id":"ee71257c.02a378","type":"api-current-state","z":"bddbed6b.c9ee5","name":"check Jason home","server":"45bd2b8d.85fc14","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_boolean.jasonhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":750,"y":60,"wires":[["f5bf7829.24bc88"],[]]},{"id":"edfb39d.5c357c8","type":"api-call-service","z":"bddbed6b.c9ee5","name":"Anyone home?","server":"45bd2b8d.85fc14","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.home","data":"","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":760,"y":360,"wires":[[]]},{"id":"bf186808.a44bb8","type":"server-state-changed","z":"bddbed6b.c9ee5","name":"Kate Home","server":"45bd2b8d.85fc14","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"device_tracker.life360_kate","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":60,"y":380,"wires":[["f02e7e93.97dc7"],["105c46bf.c492b9"]]},{"id":"f02e7e93.97dc7","type":"api-call-service","z":"bddbed6b.c9ee5","name":"Katelynn Home","server":"45bd2b8d.85fc14","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.katelynnhome","data":"","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":260,"y":360,"wires":[["edfb39d.5c357c8"]]},{"id":"105c46bf.c492b9","type":"api-call-service","z":"bddbed6b.c9ee5","name":"Katelynn away","server":"45bd2b8d.85fc14","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.katelynnhome","data":"","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":260,"y":440,"wires":[["72f85e95.694c3","60a4ac7b.151054","ee71257c.02a378"]]},{"id":"f0b9f621.a6c268","type":"server-state-changed","z":"bddbed6b.c9ee5","name":"B Home","server":"45bd2b8d.85fc14","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"device_tracker.life360_brenden","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":60,"y":200,"wires":[["26083c6.08259c4"],["80443f6.b29aac"]]},{"id":"26083c6.08259c4","type":"api-call-service","z":"bddbed6b.c9ee5","name":"Brenden Home","server":"45bd2b8d.85fc14","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.brendenhome","data":"","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":280,"y":180,"wires":[["edfb39d.5c357c8"]]},{"id":"80443f6.b29aac","type":"api-call-service","z":"bddbed6b.c9ee5","name":"Brenden away","server":"45bd2b8d.85fc14","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.brendenhome","data":"","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":280,"y":260,"wires":[["ff307fda.d9d78","60a4ac7b.151054","ee71257c.02a378"]]},{"id":"6e8cd3fb.72250c","type":"server-state-changed","z":"bddbed6b.c9ee5","name":"Kim Home","server":"45bd2b8d.85fc14","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"device_tracker.life360_kim","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":60,"y":120,"wires":[["9092b0cc.3c9eb"],["9cf8ccc6.30a8e"]]},{"id":"9092b0cc.3c9eb","type":"api-call-service","z":"bddbed6b.c9ee5","name":"Kim Home","server":"45bd2b8d.85fc14","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.kimhome","data":"","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":270,"y":100,"wires":[["edfb39d.5c357c8"]]},{"id":"9cf8ccc6.30a8e","type":"api-call-service","z":"bddbed6b.c9ee5","name":"Kim away","server":"45bd2b8d.85fc14","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.kimhome","data":"","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":260,"y":140,"wires":[["ee71257c.02a378","72f85e95.694c3","ff307fda.d9d78"]]},{"id":"60a4ac7b.151054","type":"api-current-state","z":"bddbed6b.c9ee5","name":"check Kim home","server":"45bd2b8d.85fc14","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_boolean.kimhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":740,"y":120,"wires":[["f5bf7829.24bc88"],[]]},{"id":"72f85e95.694c3","type":"api-current-state","z":"bddbed6b.c9ee5","name":"check Brenden home","server":"45bd2b8d.85fc14","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_boolean.brendenhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":760,"y":180,"wires":[["f5bf7829.24bc88"],[]]},{"id":"ff307fda.d9d78","type":"api-current-state","z":"bddbed6b.c9ee5","name":"check Katelynn home","server":"45bd2b8d.85fc14","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_boolean.katelynnhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":760,"y":240,"wires":[["f5bf7829.24bc88"],[]]},{"id":"f5bf7829.24bc88","type":"api-call-service","z":"bddbed6b.c9ee5","name":"No one home","server":"45bd2b8d.85fc14","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.home","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":140,"wires":[[]]},{"id":"45bd2b8d.85fc14","type":"server","name":"Home Assistant","addon":true}]`

You would be better off asking these types of specific questions re Home Assistant over on their forum - the nodes you are most probably using are specific to HA and are not part of the default palette.

Craig

ok, thank you

Maybe a bit off topic, but if you succeed, could you post your flow in Share your flows?

I tried various HA "presence detection" and never could get them to work reliably.

I ended up using Radius BLE "keyfob" beacons and a few PiZeroW placed strategically to read them with node-red and some exec node commands. It has worked very well for several years, but I'm tired of having to change the batteries in the keyfobs every 3-8 months, so I'm on alert for better options.

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