Life 360 home zone

hi, if I have configured zones in the home assistant and would like to use life360 to see when a member of the circle arrives home, how should I do? this is my automation.

- id: via_da_casa_angela
  alias: 'via da casa angela'
  trigger:
    platform: state
#    entity_id: person.angela
    entity_id: device_tracker.life360_angela
#    from: 'home'
    to: not_home
    for:
      minutes: 10
  condition: []
  action:
    - service: input_boolean.turn_off
      data:
        entity_id: input_boolean.presenza_casa_angela

- id: ritorno_a_casa_angela
  alias: 'Ritorno a casa angela'
  trigger:
    platform: state
    entity_id: device_tracker.life360_angela
#    from: 'not_home'
    to: 'home'
    for:
      minutes: 2
  condition:
    condition: and
    conditions:
    - condition: state
      entity_id: input_boolean.presenza_casa_angela
      state: 'off'
    - condition: time
      after: '08:00'
      before: '21:00'
  action:
    - wait_template: "{{ is_state('binary_sensor.motion_sensor_158d000224fb8d', 'on') }}"
      timeout: '00:30:00'
      continue_on_timeout: 'false'
    - service: input_boolean.turn_on
      data:
        entity_id: input_boolean.presenza_casa_michele
    - service: switch.turn_on
      data:
        entity_id: switch.sonoff_10006abd6c  #cancello
    - delay: '00:07:30'
    - service: notify.alexa_media_echo_dot_di_angela
      data:
        target:
          - media_player.alexa
        data:
          type: announce
          method: speak
        message: >
           {{ ["Bentornata a casa Angela!","Guarda chi si vede, Angela!","Ciao Angela","Casa dolce casa."] | random}}

Sometimes he reports that Angela is not at home despite being at home and the boolean input goes off and the gate opens

someone who could help me?

I’m not sure I’m following all of that, and there appears to be more related YAML code than you’re showing, but how about we start with the basics? Does device_tracker.life360_angela always change to home when Angela is home, and to something else (either not_home or a zone name) when Angela is not home?

Regarding the first automation you show, I think the trigger should be from: 'home' (as you show in the comment) as opposed to to: not_home. If Angela leaves, but enters another zone before the 10 minutes expires, then the trigger will not fire.