Node-Red Automation

Hi All,

I’m trying to accomplish an automation that triggers when we are both NOT home. Now it works… half…
When i leave the house it check’s the wife’s phone. If she’s not at home it turns off all lights.

image

I thought that the if state not_home is for everything except home.
When the wife is at a location like “Schelp” it stops there…

So i’m not home; that is true. The wife is at the “Schelp” so she is away, but according to Node-Red that’s not. Am i missing something?

Maurice Card:

Yvette Card:

Sometimes there can be more states, but check on the state home only then. Just change the “is” instead.

1 Like

Actually it’s pretty annoying/misleading inconsistence in the state naming. not_home in fact means “not in any zone”.

BTW your flow is triggered only if Maurice location changes to “home”. And only then your wife’s location is being checked.

1 Like

You need to change the dropdown selector that currently says “is”, to “is not”, and “not_home” to “home”.

That way it can be anything but “home” which is what you want.

2 Likes

I would use a group for that. Just place both device_tracker entities in a group and use an events: state or a trigger: state node to track that group state changes.

If both entities are away, the group state will be not_home. And if at least one is home, the group state will be home.

EDIT: You can find an example of the group configuration and an explanation of its behavior here

1 Like

Thanks!. I’ve used that and now it’s working the way it was supposed :slight_smile: