I’ve been having issues with receiving notifications from the notify.notify service on my phone. The weirdest thing seems to cause it…
TL;DR: If you have a device that has the Home Assistant Mobile/Companion app installed but the device is inactive/disconnected - it can cause the notify.notify service to stop and not send notifications to other active devices that have the Companion app installed. Finding any devices that are inactive/no longer in use and removing them from HA can fix the issue.
I have a Quest 3 VR Headset with Home Assistant Companion App sideloaded so I can see and use the VR headset sensors as triggers and conditions in automations and scripts (notify when the battery is low, turn the lights on/off when the headset is put on/taken off, etc.)
Next, I also have two phones that have the Companion App installed. My wife’s and my own. Three total devices with the Companion App installed.
The skinny: If the VR headset is INACTIVE (sleeping) - I will not receive notifications from the notify.notify service on my phone, but my wife still receives them on her phone, and I get an error in HA:
Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:1792
First occurred: 10:32:57 AM (1 occurrences)
Last logged: 10:32:57 AM
websocket_api script: Error executing script. Error for call_service at pos 1: Device not connected to local push notifications
If the VR headset is ACTIVE (connected) then all three devices will receive the notifications from the notify.notify service.
Now, I’m not sure the order of operation here or why my wife consistently receives notifications when the VR headset is inactive but I do not, but I suspect it could be the order the devices were connected, or alphabetically, or something… but it’s consistent and repeatable.
Are notifications sent sequentially? Maybe HA is throwing an error because the headset is disconnected, and then it stops sending notifications to any devices that would follow in the series. So, the headset doesn’t receive the notification (obviously, it’s not active) and my phone also does not receive the notification because it comes AFTER the point of failure. If I plug the VR headset in or wake it up. My phone starts receiving any new notifications sent via notify.notify, but it doesn’t receive any past/missed notifications retroactively (expected).
The logs are not helpful in identifying the device that failed to receive the notification or that caused the stop/error.
This is just a theory, but it would be great if folks smarter than me could do some testing and validation and confirm/correct the issue so that the notification doesn’t stop on error and continues to send notifications to active devices. Is this even something that HA can fix? I have to believe yes, because almost all other notification services from any provider do not behave this way.
In the meantime, I’ve updated some automations to send notifications to specific devices (via a notifications group), which does work but it’s spotty and sometimes the notifications are very delayed or not received until the phone screen is activated or HA is opened (not sure what the pattern is here, I’ve verified correct persistence settings on both phones). However, I would much prefer to be able to use notify.notify for simplicity and accuracy, plus it can be done from the UI whereas using a notification group has to be done from configuration.yaml (one time setup but requires maintenance when new devices are added or old ones removed).
Unrelated suggestion: Add notification group as a group type in the Helpers → Group UI in HA.
Thoughts? Am I crazy?