If you don't have the app already installed, you will find links for both the Android and iOS versions plus the official Home Assistant Companion App documentation here.
- Home Assistant OS running on a Raspberry Pi (3 and above) or similar
- Home Assistant Companion App pre-installed on your phone or mobile device and registered with your Home Assistant instance. You must be logged into Home Assistant from the app to receive push notifications.
Software Versions Used in this Guide
- Home Assistant OS version 2021.7.4
- Home Assistant Companion App for Android version 2021.6.2-full
- Supervisor version 2021.06.8 (stable)
STEP 1: Create a New Automation
To do this, we need to create an new automation.
Start by logging into home assistant and navigating to Configuration > Automations and clicking the ADD AUTOMATION button in the bottom right corner:
STEP 2: Define the Automation
STEP 3: Define the Automation Trigger
For a device trigger, set the Trigger Type to "Device", choose your device from the Device drop-down, and set your Trigger to "<your device name> turned on". Then, set the Duration to 10 mins:
STEP 4: Define the Push Notification Action
First, skip the Conditions section and then under Actions, set the Action Type to "Call Service" and under Service, type the service name "notify.notify" and select the corresponding "Notifications: Send a notification with notify" option from the drop-down list.
Finally, fill in the Message you want to send and set an optional Title:
STEP 5: Testing the Notification
(Optional) STEP 6: Actionable Notifications
One of the simplest yet useful actionable notifications we can build is to add a button which when pressed, launches the Home Assistant App and takes us straight to our favourite Lovelace dashboard. To do this, all you need to do is append the following 4 lines of code under the Data section of the Action we defined earlier:
The notification will now look like this:
(Optional) STEP 7: Critical Notifications
An example we want to demonstrate here is particularly important for some Android users where notifications can sometimes get missed when the phone has been locked or the screen has been switched off for a prolonged period of time. To ensure notifications are never missed in these cases, we can again build on the previous step by adding the lines "ttl: 0 " and "priority: high" to the Data section of our existing Action: