Yesterday I installed HA on my Rasp 3B+, and I installed the iOS on my iPhone XS. It is really cool to have all the entities with iPhone informations, like battery % and charging status.
I could create some automations with Charging status, but what I found out is that these sensor/entities are updated only if the iOS Home Assistant Companion App is open. If it’s closed in background on Home Assistant the entities won’t update.
Is this right? Or I have some issues? Can I do something so that HA can gets the iPhone data informations without always have to open the iOS app?
Not related to your question, but since the IOS companion app update, my Phone app must be open as well to trigger any watch actions, amongst a list of other HA things.
Launching the app regularly will “train” the OS to start launching it in the background to provide updates. Unfortunately there’s no real mechanism to do regularly-scheduled background updates, but the sensors will also update with location changes. You can also remotely trigger location updates.
It can update constantly, but you must set application to share location “always”.
You can find it in iOS config or start from application settings in HA application - it will redirect you to mentioned iOS settings
Same here.
Gave all the permissions needed (update location: always even when the app is not in use, update sensors every 20 seconds, etc. etc.)
I have automations based on “device_tracking” state (for example: my iPhone location and / or my iPhone connection type) which work only if I launch the app.
The app needs to be open and active in foreground. If the app is parked in the background automations do not work since the sensors values aren’t updating.
I hope an update that addresses this issue is released since without this the companion app is basically useless.
i have exactly the same on Android, even when in the house on the WiFi none of the phone sensors will update HA unless i open the app.
When the app is open things update instantly - for example changing phone from ringer to silent you can see this update in HA states instantly but nothing works unless the app is open which isn’t viable.
If you want your charging state to update instantly, you can add a Personal Automation in the Shortcuts app to trigger the Home Assistant action “Update Sensors”.
Great idea! Totally works, but even when I have “Show When Run” turned off, I get notifications every time the automation runs. Do you have the same issue?
I’m still having this issue. Nothing updates automatically as I would expect and I’ve given every setting a thorough double check. Is this expected or is the companion app broken? Did an iOS update kill old functionality? I’m really confused and rather disappointed.
The general answer is that restarting your phone may help, but it’s not a great answer. The only situation I’ve seen where focus doesn’t work on its own is when it’s in the “allowed” list (writing this down for others, as I can see you’ve checked this above).
Do you have any crashes in the system Settings app > Privacy > Analytics > Analytics Data for anything starting with “HomeAssistant”?
If not, and restarting doesn’t help, it might be worth grabbing the logs from App Configuration > Debugging and looking at the HomeAssistant-Intents.txt file to see if it’s being opened to do the work of sending the sensor update.
No, there are no crashes (or anything) starting with HomeAssistant in Analytics Data.
As far as I can tell from the Intents log, it’s not being opened to do the work either. I toggled focus (with no effect), then exported the log. There’s not much there, but the timestamps are all from last night.
As soon as I open the app of course, it picks up the toggled focus and HomeAssistant itself gets updated.
edit: The issue persists after rebooting the phone. Powered on, toggled focus a few times, nothing. Opened the app and the focus setting is picked up immediately.
I am facing the same issue. Only when the app is open on the phone, then it is updated. The sensors should trigger a state update. However, the only thing that triggers it is the app is launched. Having a notification sent out is not ideal.
The alternative of using Siri shortcuts is not practical. Why use two home automation!