I just wanted to share an option to do more with your Apple Watch and home assistant. I got the idea from somewhere else but can’t remember where so I just wanted to share it here so it might inspire others as well. The possibilities with Apple Watch are quite limited but using actionable notifications, you can do a lot more.
The idea is you create an action in the companion app, which you can trigger from your Apple Watch. You then create an automation that triggers actionable notifications witch can act like a dropdown multiple choice menu.
In my case I have 3 covers that I want to control from my watch. So I press the action ‘control covers’ and I get a notification asking which cover? 1 2 or 3? After pressing any of them I get another notification asking: what action? up, stop or down? Once I press that the cover of my choice will open or close.
Screenshots:
To create an action in the companion app: go to settings, companion app, actions. Adding a new one is just adding a name an a nice icon and colors if you like. The name of the action will be the trigger in your automation. Mine is called ‘Rolluiken’.
So how it works is: it starts when the ios.action_fired is received. It then sends a notification with 3 options to click on. It then waits for any of the three options clicked. Then it stores the matching entity name in a variable called ‘Rolluik’ so I can use that variable later. Then it sends me another notification with 3 options to click on, and waits until one of the options is clicked. The button clicked is stored in the variable called ‘option’. Lastly I call the correct service (open, stop or close) based on last option clicked and use the entity from the variable ‘rolluik’ to determine which cover to control.
Use short texts in your notifications to make it more readable and user friendly so you don’t have to scroll a lot.
I came to the same idea on the added value of iOS actions for Apple Watch and wanted to share these ideas in this forum but then I noticed you shared it already before me and with an even better automation!
So I upgraded my automations based on the script you shared ;).
Yet I also applied some “improvements” that might be interesting for other to consider maybe…
When the iOS actions are triggered from CarPlay or while driving, the notification would be shown in CarPlay only if the notification is marked as critical. So I added a variable to check this for all my notifications.
When using the wait_for_trigger with a timeout for follow up actions on the iOS events, I liked the possibility to remove the notification completely (using notification tag) once the wait timeout has passed, the follow up actions won’t work anymore anyway.
I also found some way to reuse the actions by defining these in variables first. This allows to define the notification actions based on some conditions, without having to re-define the same actions multiple times.
I also use some emoticons in the action names to make the actionlist even easier to use.
I defined some standard processing based on the selected action. Depending on the type of entity linked to the action, the correct toggle action will be selected (eg script.... entity will be launched with script turn on service call, light.... entity with a light toggle script, a selected climate.... entity will turn on the heating or return to auto hvac mode, etc).
(Some events of my (plex related) actions in the example above are handled by separate automations and some are handled by the inline wait_for_trigger event handler)
06/03/2024: updated code: most of the time no need to specify all different actions in the wait_for_trigger