Notify when enters a zone with conditions

Hi Everyone, just getting into HA, just wondering if A notification can be sent to a device when another device enters a zone, but only if that device is within the zone for a specified period in time. I don’t want to be notified each time the device enters the zone because the zone is the local shops and also the on the way home, I would like to only know if the device enters the zone and for example, within the zone for a minimum of 5 min’s, that would indicate to the recipient of the notification that the device is at the local shops, that way the I can call that person if I need something saving me a trip to the shops if they are already there. Hope that makes sense. Thanks in advance for any help or suggestions

Sure you can do that. As long as you are using the person integration, the state of the zone is the number of persons in the zone.

trigger:
  - platform: numeric_state
    entity_id: zone.shops
   above: 0
   for:
     minutes: 5
action:
  - service: notify... etc

Thanks heaps Tom, I’ll give that a crack next time I can get to it. Just learning all this stuff and getting my head around it while working two jobs and never ending maintenance work around the house so I appreciate your assistance with a solution to try.

:+1:

Hi Tom, can you please have a look at the attached and advice exactly what I should adjust in the YAML code?

Kind regards,
Damien


notify_device

No, I don’t use blueprints.