Companion app doesn't update wifi sensor

I use the android companion app wifi sensor to de-activate my home alarm when I am out, but I found the sensor only update the wifi ssid if I open the companion app. If I just go out, sensor isn’t updated, and my phone is showed as connected to my home wifi in home assistant, even if it doesn’t. I need to open the companion app in my phone, and then the ssid is updated in home assistant and the alarm is activated…

Is there something I need to configure in my phone to the companion app update the sensors by its own?

Notices this also recently. This is why I switched to monitoring on my WIFI router if the phone is connected

But the router must be supported in this case, right? It must be integrated in HA?

Are you sure the phone has permissions to run in the background?

What pdwonline proposed is not something you should do since you toggle the alarm with it.
If you reboot your phone then the alarm will be activated.

Seems to me that if someone does switch off the WiFi on the phone, or the phone runs out of battery, the same will happen using the app. Means it could be safe to switch off the alarm when the phone is detected, but switching on based on WiFi is a different thing…

Because my wife is a bit afraid of Wifi radiation, she constantly switches of the Wifi. Therefore I use the ‘spider in the box’ model. Presence is detected by WiFi and it remains enabled until the door opens, because that means someone can potential leave the house.

This is my code for it:

  - id: MyID
    alias: presence me
    description: Presence detection using spider in the box model.
    mode: parallel
    trigger:
    - platform: state
      entity_id: 
        - sensor.my_wifi_from_app
    - platform: time_pattern
      minutes: "/10"
    - platform: state
      entity_id:
      - binary_sensor.door_frontdoor
      to: 'off'
      id: door
    action:    
    - if:
      - condition: trigger
        id: 'door'
      then:
        - delay: '00:05:00'
        # probably away? (door had been opened)
        - condition: template
          value_template: >-
            {{ 
              states("sensor.my_wifi_from_app") != "MYSSID"
            }}
        - service: input_select.select_option
          target:
            entity_id: input_select.presence
          data:
            option: 'Away'
      else:
        - condition: template
          value_template: >-
            {{ 
              states("sensor.my_wifi_from_app") != "<not connected>"
            }}
        # Confirm present
        - service: input_select.select_option
          target:
            entity_id: input_select.presence
          data:
            option: 'Home'

Actually no…
The state is preserved as it was when the battery runs out.
Same thing if you reboot. The only time it will not work is if you drop the wifi due to coverage or turn off wifi.
Then the phone will activate the mobile network and update the sensor.

yup this is typically the issue when sensors dont update as quickly as we would expect

Yes, permissions are ok… I think I will change to a different way to detect presence… any advice?

Weird, works perfectly for me - as long as I have working mobile data.

All other sensors update ok?

background access is not necessarily a permission if for example you have a samsung device you have several settings to turn off.