iPhone was Detected at Unavailable

Since I recreated my HA installation from scratch my iPhone no longer works as a presence sensor. The previous automations I used are never called because it appears the iPhone never leaves home. I know these automations work as I can trigger them by using the Mobile App/iPhone Reload menu command under the HA Configuration/Integration screen. The event log for the iPhone then shows two entries which are:

Was detected at home
2:49:27 PM - 42 minutes ago

Was detected at unavailable
2:49:27 PM - 42 minutes ago

Using this reload option is the only way I can trigger the automations which are:

automation 800:
  alias: 'iPhone Arrive Home'
  trigger:
    platform: state
    entity_id: device_tracker.cors_iphone
    to: 'home'
  action:
    service: shell_command.egmsg
    data_template:
      message: 'HA.iPhone'
      state: 'Home'
# ===============================
automation 801:
  alias: 'iPhone Leave Home'
  trigger:
    platform: state
    entity_id: device_tracker.cors_iphone
    from: 'home'
  action:
    service: shell_command.egmsg
    data_template:
      message: 'HA.iPhone'
      state: 'Away'

However, actually leaving home and the iPhone state never appears to change.
I have run out of ideas on where to look or what to change and am looking for help getting this to work again.

I know this is an old post but did you get anywhere with this? I’m seeing the same, with various devices flipping about once at hour between home and unavailable.