Node-red light automation/input boolean

hi there,

i have made 2 input_boolean’s, one for me and one for my wife. it al works… it toggles on/off on ping/app sensor.

now in node-red I want to make a automation for the lights, it works for so far that its on each person it activate’s the lights.

but if my wife is already add home I don’t want it to toggle the lights and vice versa! how can I add a node that checks if someone is already add home? and for example when I leave the home the lights while not turn off?

this is what I have add the moment:

[{"id":"228935e0.00a622","type":"tab","label":"Thuis aan/afwezig","disabled":false,"info":""},{"id":"84e49bec.0397e","type":"server-state-changed","z":"228935e0.00a622","name":"Jeroen Thuis?","server":"a7811bea.26e4e8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jeroen_thuis","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,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":110,"y":160,"wires":[["7590b1f7.cc3578"],["bef3d0fb.2c779"]]},{"id":"7590b1f7.cc3578","type":"api-call-service","z":"228935e0.00a622","name":"Lampen aan","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.zithoek, light.eettafel, light.werktafel","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":470,"y":40,"wires":[[]]},{"id":"bef3d0fb.2c779","type":"api-call-service","z":"228935e0.00a622","name":"Lampen uit","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.beneden, light.boven","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":470,"y":100,"wires":[[]]},{"id":"22786fc8.cc3608","type":"server-state-changed","z":"228935e0.00a622","name":"Angela Thuis?","server":"a7811bea.26e4e8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.angela_thuis","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,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":110,"y":220,"wires":[["7590b1f7.cc3578"],["bef3d0fb.2c779"]]},{"id":"a7811bea.26e4e8","type":"server","name":"Home Assistant","addon":true}]

For logic like this, I typically insert a “current state” node to check the status of the lights before sending an on command.

Thanks for you’re reply, but I don’t get it. when I check if the light is already on? what then, I can only choose for turn_on or turn_off the light, so what will I win with this?

Is there not something like a “condition” in node-red?

Two options:
Insert a current state node to check the state of the light. If its already on, don’t do anything. If its off, continue with the flow (turn on lights).
Example:

[{"id":"84e49bec.0397e","type":"server-state-changed","z":"228935e0.00a622","name":"Jeroen Thuis?","server":"a7811bea.26e4e8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jeroen_thuis","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,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":190,"y":440,"wires":[["218e0133.df2076"],["e11b1f6d.b45928"]]},{"id":"7590b1f7.cc3578","type":"api-call-service","z":"228935e0.00a622","name":"Lampen aan","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.zithoek, light.eettafel, light.werktafel","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":910,"y":460,"wires":[[]]},{"id":"bef3d0fb.2c779","type":"api-call-service","z":"228935e0.00a622","name":"Lampen uit","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.beneden, light.boven","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":910,"y":540,"wires":[[]]},{"id":"22786fc8.cc3608","type":"server-state-changed","z":"228935e0.00a622","name":"Angela Thuis?","server":"a7811bea.26e4e8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.angela_thuis","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,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":180,"y":520,"wires":[["a1d3c28f.90e068"],["f57e85c3.b32088"]]},{"id":"218e0133.df2076","type":"api-current-state","z":"228935e0.00a622","name":"Lampen aan?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":420,"wires":[[],["7590b1f7.cc3578"]]},{"id":"e11b1f6d.b45928","type":"api-current-state","z":"228935e0.00a622","name":"Lampen aan?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":460,"wires":[["bef3d0fb.2c779"],[]]},{"id":"a1d3c28f.90e068","type":"api-current-state","z":"228935e0.00a622","name":"Lampen aan?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":520,"wires":[[],["7590b1f7.cc3578"]]},{"id":"f57e85c3.b32088","type":"api-current-state","z":"228935e0.00a622","name":"Lampen aan?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":560,"wires":[["bef3d0fb.2c779"],[]]},{"id":"a7811bea.26e4e8","type":"server","name":"Home Assistant","addon":true}]

Or the version that’s better in my opinion:

Insert a current state node and check the input booleans with it. If yours or your wifes is “True” (someones home) don’t do anything. If its “False” (nobodys home) continue with the flow (turn on lights).
Example:

[{"id":"84e49bec.0397e","type":"server-state-changed","z":"228935e0.00a622","name":"Jeroen Thuis?","server":"a7811bea.26e4e8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jeroen_thuis","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,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":190,"y":440,"wires":[["9857beca.f1a5e"],["ad166246.d5ab38"]]},{"id":"7590b1f7.cc3578","type":"api-call-service","z":"228935e0.00a622","name":"Lampen aan","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.zithoek, light.eettafel, light.werktafel","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":910,"y":460,"wires":[[]]},{"id":"bef3d0fb.2c779","type":"api-call-service","z":"228935e0.00a622","name":"Lampen uit","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.beneden, light.boven","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":910,"y":540,"wires":[[]]},{"id":"22786fc8.cc3608","type":"server-state-changed","z":"228935e0.00a622","name":"Angela Thuis?","server":"a7811bea.26e4e8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.angela_thuis","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,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":180,"y":520,"wires":[["d68bc90a.e57cb8"],["7f15d422.800c54"]]},{"id":"9857beca.f1a5e","type":"api-current-state","z":"228935e0.00a622","name":"Angela Thuis?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.angela_thuis","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":420,"wires":[[],["7590b1f7.cc3578"]]},{"id":"ad166246.d5ab38","type":"api-current-state","z":"228935e0.00a622","name":"Angela Thuis?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.angela_thuis","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":460,"wires":[[],["bef3d0fb.2c779"]]},{"id":"d68bc90a.e57cb8","type":"api-current-state","z":"228935e0.00a622","name":"Jeroen Thuis?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jeroen_thuis","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":520,"wires":[[],["7590b1f7.cc3578"]]},{"id":"7f15d422.800c54","type":"api-current-state","z":"228935e0.00a622","name":"Jeroen Thuis?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jeroen_thuis","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":560,"wires":[[],["bef3d0fb.2c779"]]},{"id":"a7811bea.26e4e8","type":"server","name":"Home Assistant","addon":true}]

Or just combine both.
Example:

[{"id":"84e49bec.0397e","type":"server-state-changed","z":"228935e0.00a622","name":"Jeroen Thuis?","server":"a7811bea.26e4e8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jeroen_thuis","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,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":190,"y":440,"wires":[["9857beca.f1a5e"],["ad166246.d5ab38"]]},{"id":"7590b1f7.cc3578","type":"api-call-service","z":"228935e0.00a622","name":"Lampen aan","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.zithoek, light.eettafel, light.werktafel","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":910,"y":460,"wires":[[]]},{"id":"bef3d0fb.2c779","type":"api-call-service","z":"228935e0.00a622","name":"Lampen uit","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.beneden, light.boven","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":910,"y":540,"wires":[[]]},{"id":"22786fc8.cc3608","type":"server-state-changed","z":"228935e0.00a622","name":"Angela Thuis?","server":"a7811bea.26e4e8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.angela_thuis","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,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":180,"y":520,"wires":[["d68bc90a.e57cb8"],["7f15d422.800c54"]]},{"id":"9857beca.f1a5e","type":"api-current-state","z":"228935e0.00a622","name":"Angela Thuis?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.angela_thuis","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":420,"wires":[[],["218e0133.df2076"]]},{"id":"ad166246.d5ab38","type":"api-current-state","z":"228935e0.00a622","name":"Angela Thuis?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.angela_thuis","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":460,"wires":[[],["e11b1f6d.b45928"]]},{"id":"d68bc90a.e57cb8","type":"api-current-state","z":"228935e0.00a622","name":"Jeroen Thuis?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jeroen_thuis","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":520,"wires":[[],["a1d3c28f.90e068"]]},{"id":"7f15d422.800c54","type":"api-current-state","z":"228935e0.00a622","name":"Jeroen Thuis?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jeroen_thuis","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":560,"wires":[[],["f57e85c3.b32088"]]},{"id":"218e0133.df2076","type":"api-current-state","z":"228935e0.00a622","name":"Lampen aan?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":580,"y":420,"wires":[[],["7590b1f7.cc3578"]]},{"id":"e11b1f6d.b45928","type":"api-current-state","z":"228935e0.00a622","name":"Lampen aan?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":580,"y":460,"wires":[["bef3d0fb.2c779"],[]]},{"id":"a1d3c28f.90e068","type":"api-current-state","z":"228935e0.00a622","name":"Lampen aan?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":580,"y":520,"wires":[[],["7590b1f7.cc3578"]]},{"id":"f57e85c3.b32088","type":"api-current-state","z":"228935e0.00a622","name":"Lampen aan?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":580,"y":560,"wires":[["bef3d0fb.2c779"],[]]},{"id":"a7811bea.26e4e8","type":"server","name":"Home Assistant","addon":true}]

And while we’re at it… simplify it a bit with the help of two subflows:

[{"id":"79619ebd.97337","type":"subflow","name":"Subflow 4","info":"","in":[{"x":40,"y":80,"wires":[{"id":"be6536c0.f836b8"}]}],"out":[{"x":540,"y":100,"wires":[{"id":"87bc6abc.28305","port":1}]},{"x":540,"y":60,"wires":[{"id":"87bc6abc.28305","port":0}]}]},{"id":"be6536c0.f836b8","type":"api-current-state","z":"79619ebd.97337","name":"Jeroen Thuis?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jeroen_thuis","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":200,"y":80,"wires":[[],["87bc6abc.28305"]]},{"id":"87bc6abc.28305","type":"api-current-state","z":"79619ebd.97337","name":"Lampen aan?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":80,"wires":[[],[]]},{"id":"8f0a3726.7e1c88","type":"subflow","name":"Subflow 3","info":"","in":[{"x":40,"y":80,"wires":[{"id":"1c1a734e.7eeda5"}]}],"out":[{"x":540,"y":60,"wires":[{"id":"627fb8e.5527148","port":0}]},{"x":540,"y":100,"wires":[{"id":"627fb8e.5527148","port":1}]}]},{"id":"1c1a734e.7eeda5","type":"api-current-state","z":"8f0a3726.7e1c88","name":"Angela Thuis?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.angela_thuis","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":200,"y":80,"wires":[[],["627fb8e.5527148"]]},{"id":"627fb8e.5527148","type":"api-current-state","z":"8f0a3726.7e1c88","name":"Lampen aan?","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":80,"wires":[[],[]]},{"id":"2e55210e.1b837e","type":"server-state-changed","z":"228935e0.00a622","name":"Jeroen Thuis?","server":"a7811bea.26e4e8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jeroen_thuis","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,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":110,"y":80,"wires":[["684a0b38.62d54c"],["477ad825.19075"]]},{"id":"84e56ea5.6e1d38","type":"api-call-service","z":"228935e0.00a622","name":"Lampen aan","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.zithoek, light.eettafel, light.werktafel","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":80,"wires":[[]]},{"id":"ddd5c3e1.1d57f","type":"api-call-service","z":"228935e0.00a622","name":"Lampen uit","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.beneden, light.boven","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":160,"wires":[[]]},{"id":"899963d.8dcd72","type":"server-state-changed","z":"228935e0.00a622","name":"Angela Thuis?","server":"a7811bea.26e4e8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.angela_thuis","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,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":100,"y":160,"wires":[["2e82dd6.1f342a2"],["50f8672c.e93718"]]},{"id":"684a0b38.62d54c","type":"subflow:8f0a3726.7e1c88","z":"228935e0.00a622","name":"Angela Thuis?","env":[],"x":340,"y":60,"wires":[[],["84e56ea5.6e1d38"]]},{"id":"477ad825.19075","type":"subflow:8f0a3726.7e1c88","z":"228935e0.00a622","name":"Angela Thuis?","env":[],"x":340,"y":100,"wires":[["ddd5c3e1.1d57f"],[]]},{"id":"2e82dd6.1f342a2","type":"subflow:79619ebd.97337","z":"228935e0.00a622","name":"Jeroen Thuis?","env":[],"x":340,"y":140,"wires":[[],["84e56ea5.6e1d38"]]},{"id":"50f8672c.e93718","type":"subflow:79619ebd.97337","z":"228935e0.00a622","name":"Jeroen Thuis?","env":[],"x":340,"y":180,"wires":[["ddd5c3e1.1d57f"],[]]},{"id":"a7811bea.26e4e8","type":"server","name":"Home Assistant","addon":true}]

I did it just like that, I have made a current state node checking if the other is true or false.

Thx for your feedback