Automation left zone previous hours enter new zone

Hi,

I’m trying to do an automation that inform my parents that I arrived home when I leave their home previously.

I want the trigger to be when I get home if in the last 3 hours I was at my parents’ house an action is taken.

I’m unable to perform the check if my location in last 3 hours was parents home.

Do you know how to do it?

Make a history statistics sensor on your device tracker. You can use any of the type modifiers.