Live Activity support for Home Assistant - Display Smart Home Updates on iPhone
Aivi ❤️ Home Assistant!
This guide shows you how to connect your Home Assistant automations to Live Activities on your iPhone. Once set up, your automations can push real-time updates that appear on your lock screen and Dynamic Island - perfect for monitoring long-running tasks like laundry cycles, vacuum cleaners, or anything else you automate.
The integration works through Aivi’s API, so it’s compatible with any Home Assistant installation. No custom components needed.
Setting Up Live Activities for Home Assistant
Section titled “Setting Up Live Activities for Home Assistant”-
Install Aivi on Your iPhone
Section titled “Install Aivi on Your iPhone”Download Aivi from the App Store and create an account. You’ll receive an API token that connects your Home Assistant automations to your iPhone’s Live Activities.
-
Add a RESTful Command
Section titled “Add a RESTful Command”Add a RESTful command to your Home Assistant configuration. Edit your
configuration.yamlfile and add the following snippet:rest_command:update_live_activity:url: 'https://api.getaivi.app/activity/{{ slug }}'method: PATCHheaders:content-type: application/jsonauthorization: Token [token]payload: '{{ payload }}' -
Create an Automation
Section titled “Create an Automation”Create a new automation in Home Assistant to send updates to your iPhone. This example shows how to create a Live Activity for a dishwasher:
Configure the trigger to execute on “Program progress” and “Status change” of your dishwasher. Add an action that calls the
update_live_activityservice with the following payload:slug: dishwasherpayload: >-{% set duedate_str = states("sensor.eve_programmets_sluttid") %}{% set seconds = 0 %}{% if duedate_str and duedate_str != 'unavailable' %}{% set duedate = strptime(duedate_str, "%Y-%m-%dT%H:%M:%S%z", default=None) %}{% if duedate %}{% set currentdate = now() %}{% set time_difference = (duedate - currentdate) %}{% if time_difference.total_seconds() > 0 %}{% set seconds = time_difference.seconds %}{% endif %}{% endif %}{% endif %}{"state": "{% if states("sensor.eve_driftstatus") == "run" %}ONGOING{% else %}IDLE{% endif %}","content": {"template": "generic","state": "{% if states("sensor.eve_driftstatus") == "run" %}Running{% else %}Done{% endif %}","remaining_time": {% if states("sensor.eve_driftstatus") == "run" %}{{ seconds }}{% else %}null{% endif %},"progress": {% if states("sensor.eve_driftstatus") == "run" %}{{ states("sensor.eve_programmets_framsteg")|float(0) / 100 }}{% else %}1{% endif %},"icon": "washer"}} -
Test Your Live Activity
Section titled “Test Your Live Activity”That’s it! Whenever your dishwasher runs, you’ll get a Live Activity showing the progress in real-time.
Adapting the Example
Section titled “Adapting the Example”The example above is specific to a dishwasher, but you can adapt it for any device in Home Assistant:
- Change the slug to match your device (e.g.,
washing_machine,robot_vacuum,3d_printer) - Update the sensor names to match your Home Assistant entities
- Adjust the state logic to fit your device’s behavior (running, idle, paused, etc.)
- Pick a different icon from SF Symbols that matches your device
You can track multiple devices simultaneously by creating separate automations with different slugs. Check out the Templates page to learn more about customization options like progress bars, timers, and custom states.
Common Questions
Section titled “Common Questions”Can I track multiple devices at once? Yes! Just create separate automations with different slugs for each device.
Do I need to keep the Aivi app open? Nope, Live Activities work even when the app is closed.
How is this different from the Home Assistant companion app? The companion app sends regular push notifications that disappear. Live Activities stay visible on your lock screen until the task completes, and they update in real-time without opening any app.