Connect a counter to Home Assistant with webhooks

Turn any counter into a Home Assistant trigger. When a counter reaches a value, the Counter app for Android fires a webhook to Home Assistant, so you can flip a switch, send a notification, or log a sensor. No code required.

Guide for the Counter app on Android. Works with any Home Assistant instance.

What you need

Step 1: Create a webhook automation in Home Assistant

  1. In Home Assistant, open Settings > Automations & Scenes and create a new automation (start with an empty one).
  2. Add a trigger of type Webhook. Home Assistant generates a webhook ID for you.
  3. Note the full webhook URL, which looks like https://your-home-assistant/api/webhook/your-webhook-id.
  4. Add the actions you want Home Assistant to run (turn on a light, send a notification, update a helper).

Step 2: Create a counter

Open Counter, tap the + button, and create the counter you want to track, for example "Water glasses" or "Pushups". Set the increment step and, if it helps, a maximum value.

Step 3: Add an Events & Actions rule

Open the counter, go to Events & Actions, and add a rule. Pick the event that should fire the webhook:

Step 4: Configure the Webhook action

As the action, choose Webhook and fill in:

Example body:

{
  "counter": "{{title}}",
  "value": {{value}}
}

Counter replaces {{title}} and {{value}} with the live counter data when the webhook is sent.

Step 5: Test it

Increment the counter until the event condition is met. Home Assistant receives the webhook and runs your automation. If nothing happens, check the automation traces in Home Assistant and make sure the URL is reachable from your phone's network.

Tip: if your Home Assistant is only reachable on your local network, keep your phone on the same Wi-Fi, or use a remote URL (Nabu Casa or your own reverse proxy).

Things you can build

For the full list of webhook options (authentication, retries, timeout), see the FAQ.

Start automating your counters

Free download. No account required. Unlimited counters.

Get it on Google Play