User Tools

Site Tools


pollondemandlocator

Step 1: Disable Background Tracking on Your Phone To ensure Home Assistant never tracks you automatically, you need to turn off the background location sensors in the Android app.

  1. Open the Home Assistant Companion App on your Android phone.
  2. Go to Settings > Companion App > Manage Sensors.
  3. Look for the following sensors and disable them:
    • Background Location
    • Location Zone

Enable this:

  • Single Accurate Location

Note: Do not revoke the Android OS location permission for the app itself. The app still needs system permission to grab the GPS coordinates when Home Assistant manually requests them.

Step 2: Create the “Locate Phone” Script Next, we will create a script in Home Assistant that forces the Android app to report its current location immediately using a high-priority notification command.

  1. In Home Assistant, go to Settings > Automations & Scenes > Scripts.
  2. Click Add Script → Create New Script.
  3. Switch to the YAML editor (via the three dots in the top right) and paste the following code (replace notify.mobile_nokiax10) with your actual phone's notify entity):
sequence:
  - action: notify.mobile_nokiax10
    data:
      message: command_request_location
mode: single
icon: mdi:crosshairs-gps
alias: Request Phone Location

** if above doesnt work, use this:
action: notify.mobile_app_nokiax10
data:
  message: command_request_location

Step 3: Add the Button to Your Dashboard Now, add a button card to your Lovelace dashboard so you can trigger the location request on demand.

  1. Go to your dashboard, click the three dots in the top right, and select Edit Dashboard.
  2. Click Add Card and choose the Button card (or a Tile card).
  3. Configure the card with the following settings:
    • Name: Locate My Phone
    • Icon: mdi:cellphone-marker
    • Tap Action: Run Script
    • Script: Select the script you created in Step 2 (script.request_phone_location).
type: button
name: Locate My Phone
icon: mdi:cellphone-marker
tap_action:
  action: perform-action
  perform_action: script.request_phone_location
pollondemandlocator.txt · Last modified: by jwan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki