From and To in Node-Red

There is a node for trigger that only trigger when this type of event happen?

platform: state
entity_id: person.me
from: work
to: home

This example, it triggers only when it goes to HOME, and not any state else.

Thank you for your attention in advance.

trigger: state node

But this node trigger with every event.
I want one to trigger just when:

Work > Home
not
Work > not_home > home

image

Where can i find this tab?

it’s in the trigger: state node

Where? Lol

that’s the events: state node

Ahhh, ok! Thanks!

btw is your person state really turns from work directly to home? just asking because if work location is distant from home it will trigger states as follows: work - not home - home
Then the methods above will not work

Its just an example, i just don’t want to Work > not_home trigger something, and this fix my problem!

Now it will just trigger when:

Not_home > Work
or
Home > not_home