Skip to content
Plain and Simple
← All answers

The question

How do I get my iPhone step count into Home Assistant?

The official Companion app may already do it. Here is what it gives you, what a shortcut gives you, and where both fall short.

Why this is awkward

Start here, because it may save you installing anything: the official Home Assistant Companion app already ships a steps sensor. Enable it in the app's sensor settings and you have a step count on your dashboard for free. If that is enough, you are done — genuinely, stop reading.

What it is not is Apple Health. Companion's sensor reads CoreMotion, the phone's own motion processor, so it counts the steps that phone recorded and resets at midnight. If you wear an Apple Watch, Health merges the watch and the phone into one number, and Companion's will be the lower of the two — often by thousands on a day you left your phone on the desk. It also updates when the app gets a chance to run, which is not the same as hourly.

So the real question is usually narrower than it first sounds: how do I get the Apple Health number — the one my phone actually shows me — into Home Assistant, for everyone in the house, without babysitting it.

Doing it yourself

The hand-rolled answer is Shortcuts plus a webhook, and it works. In Home Assistant, make an automation with a webhook trigger and give it an ID. That gives you a URL that accepts a POST from anything on your network.

On the phone, build a shortcut: Get Health Sample → Steps, with the range set to today and the aggregation set to sum, then Get Contents of URL pointed at that webhook, method POST, request body JSON, with the step count as a field. Have the automation set an input_number, or fire a template sensor from the payload. Then add a Personal Automation to run the shortcut on a schedule.

automations.yaml — the receiving half
trigger:
  - platform: webhook
    webhook_id: !secret steps_webhook_id
    allowed_methods: [POST]
    local_only: true
action:
  - service: input_number.set_value
    target:
      entity_id: input_number.steps_today
    data:
      value: "{{ trigger.json.steps | float(0) }}"

What that costs you

  • It fails silently. A shortcut that cannot reach the webhook — you are out of the house, the automation did not fire, iOS decided this was not the moment — does not tell you. It reports the last number it managed to send, and a step count that has stopped climbing looks a lot like a quiet day.
  • iOS decides when personal automations actually run. This is not a shortcut you can fix; it is the platform, and it is the same constraint any background job on iOS lives under.
  • The webhook URL is the credential. It sits in a shortcut on a phone, and if you want it to work when you are not on home Wi-Fi it has to be reachable from outside your network, which is a rather bigger decision than a step counter deserves.
  • Every extra person is a whole second copy: another shortcut, another webhook ID, another entity, all named by hand, and all of it to be redone when someone gets a new phone.
  • Nothing about it is discoverable six months later. A webhook ID in a secrets file and a shortcut on someone else's phone is a thing you will have to reverse-engineer the next time it breaks.

Or the app that does it

The app reads the Apple Health figure — the merged one, including the watch — and sends it to your own Home Assistant. It is two halves: an app on the phone and an integration inside Home Assistant, and the second half exists specifically to delete the setup above.

You add a person in Home Assistant, it creates a private webhook for them and shows a QR code, and you scan it with that person's phone. No addresses typed by hand, no YAML, and each person gets their own webhook and their own sensor without you naming anything twice. If you would rather not install the integration, the app still supports the configuration.yaml route.

Left alone it sends about once an hour in the background — iOS still decides when background work happens, so that is a target rather than a promise, and Send my steps now always works immediately. The only network request it ever makes is to the address you entered, which is usually a machine in your own house.

Where your data goesYour own Home Assistant