This repository has been archived on 2025-04-22. You can view files and clone it, but cannot push or open issues or pull requests.
ha-client.app/help/mobile_app_integration.md
2020-05-03 21:48:55 +03:00

4.9 KiB

Help pages - Mobile app integration

If this documentation was not useful enough for you, feel free to ask any question in HA Client on Descord

{% include in_post.html %}

Home Assistant Mobile App Integration allows HA Client to handle push notifications and report your device location and battery state.

After successful login HA Client will automatically register itself on your Home Assistant to make notifications and location tracking possible and then will ask you to restart your server.

image

You can find Integration settings in App settings from main HA Client menu.

image

image

image

Back to top

Device name

On first app start you can choose device name for your integration. All entity names created by this integration will depend on that name.

If you want to change device name for already created integration, you need to remove Mobile App: [your device name] from Home Assistant Configuration - Integrations, then restart your server and launch HA Client once again. The app will ask you to create new integration allowing to change default device name.

Notifications

HA Client supports sending notifications from Home Assistant to the app.

For now notificationas could only have title and text. No actions supported yet. After mobile app will be registered and your Home Assistant will be restarted you'll get a new notify like notify.mobile_app_egor_s_pixel_3_xl (depends on device name). It can be used to send notifications to HA Client on a specific device. Just call this service with some data:

{"title":"Oi!", "message":"Something is moving on your backyard!"}

The title is not mandatory, by defauld it will be "HA Client".

Back to top

Location tracking

HA Client supports updating device_tracker entity with real device GPS location.

Location tracking is implemented with Andorid Workmanager. It means that background location tracking is battery friendly and work as intended from OS perspective.

After mobile app will be registered and your Home Assistant will be restarted you'll get a new device_tracker entity like device_tracker.mobile_app_egor_s_pixel_3_xl (depends on device name). To start sending location to this entity you need to enable Location tracking in HA Client through Integration settings in App settings

image

image

image

Back to top

{% include in_post.html %}

Troubleshooting

If notifications or location tracking doesn't work, first thing you need to check is entities name you are using. You can check that in Configuration - Integrations - Mobile App: [your device name] in your Home Assistant.

Also it could be useful to remove Mobile App integration from Home Assistant and restrat server to allow HA Client to create integration once again.

Notification issues

There is a restriction on daily notifications count for each device: 50.

Location tracking issues

  • Make sure the Location permission is granted for HA Client.
  • You can disable background location tracking task and enable it again to resolve possible issues. Go to Integration settings in HA Client and disable Location tracking to cancel backgroud tasks. Then enable it back.
  • You can add exception for HA Client in battery saving settings on your Android device to improve background tasks execution. This can help solving some location tracking issues on older Android versions. It can be achieved differently on different Android versions and even on different devices. For example in Android 10 on Pixel phones you need to go to Settings -> Apps & notifications tap Advanced -> Special app access -> Battery optimization. Or simply search for Battery optimization on main Settings screen with search field. Inside Battery optimization switch to All apps, find HA Client in the list and tap it. On the popup appeared choose Don't optimize:

Battery optimization

Back to top

User interface < Previous | Next > Additional features