Automation Based on Phone GPS

Hello, I am having problem in the trigger state of my automation. I am working on two automation which they are dependent each other. the trigger condition is trig by each other if the statement is true it is like a loop. However it works for quite some time but after lets say 1 day the other automation is not trig by even if the condition id true unless I refreshed or run it again.
here is my code…

alias: Phone Detection
description: Configuration of Toshiba
trigger:

  • platform: state
    entity_id:
    • input_boolean.gps
      to: “on”
      condition:
      action:
  • service: notify.mobile_app_sm_a115u
    data:
    message: " You’re in the office zone."
    title: notify me
  • service: input_boolean.turn_on
    target:
    entity_id: input_boolean.efh
    data: {}
    enabled: true
  • delay:
    hours: 0
    minutes: 0
    seconds: 6
    milliseconds: 0
  • service: script.test_light_on
    data: {}
    enabled: true
  • repeat:
    sequence:
    - if:
    - condition: not
    conditions:
    - condition: zone
    entity_id: device_tracker.tamrat_a11
    zone: zone.ats
    then:
    - service: input_boolean.turn_off
    target:
    entity_id: input_boolean.gps
    data: {}
    enabled: true
    until:
    - condition: state
    entity_id: input_boolean.gps
    state: “off”
    mode: single

alias: Phone Exit
description: Configuration of Toshiba
trigger:

  • platform: state
    entity_id:
    • input_boolean.gps
      to: “off”
      condition:
      action:
  • service: notify.mobile_app_sm_a115u
    data:
    message: You’re not in the office zone
    title: Notify me
  • service: input_boolean.turn_off
    target:
    entity_id: input_boolean.efh
    data: {}
    enabled: true
  • delay:
    hours: 0
    minutes: 0
    seconds: 6
    milliseconds: 0
  • service: script.test_light_off
    data: {}
    enabled: true
  • repeat:
    sequence:
    - if:
    - condition: zone
    entity_id: device_tracker.tamrat_a11
    zone: zone.ats
    then:
    - service: input_boolean.turn_on
    target:
    entity_id: input_boolean.gps
    data: {}
    until:
    - condition: state
    entity_id: input_boolean.gps
    state: “on”
    mode: single