Has anyone found a way to make alerts using pushover notifciations and setting priorities for them? I have regular alerts working with pushover as the notification service, but I want to be able to set priorities so that they scream sounds at me regardless of my phone being on vibrate or not. I’m able to do automations this way, but I want to set alerts using priority “1”.
Did you ever figure this out
Hi, just found this topic because I have the same problem. Manually sending a pushover notification with priority works. E.g. from dev tools:
service: notify.pushover
data:
message: The garage door has been open for 10 minutes.
data:
priority: 1
However, integrating them into a notifier group as described in the documentation fails. Configuration:
notify:
- name: pushover
platform: pushover
api_key: !secret pushover_api_key
user_key: !secret pushover_user_key
- name: critical_pushover_notification
platform: group
services:
- service: pushover
data:
priority: 1
call it via dev tools:
service: notify.critical_pushover_notification
data:
message: Test with notifier group that has priority data set
yields the following error in the Core log:
2022-01-29 18:43:09 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1449, in async_call
processed_data = handler.schema(service_data)
File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['priority']
Why? This looks like a bug to me. A similar twilio notifier group works with the extra data key for target:
- name: critical_notifications # For critical alerts such as water leaks
platform: group
services:
- service: twilio_call_notifier
data:
target: !secret mobile_number
Environment: Core 2021.12.10
Ok, I found the solution: The target
key is a known schema component living directly under data
. Whereas priority
has to be nested into another data
element like this:
- service: pushover
data:
data:
priority: 1
Hope this helps others.
I don’t know if this changed recently but the way you accomplish this now is to integrate the message priority into the alert parameters:
repeat: 10
skip_first: true
data:
priority: 1
notifiers:
- Pushover
I am having this same issue. I want two notifications. One for mundane stuff and one for an emergency. I can select both from an Automation and I can run the action and they will work with the exception that the priority and sound is ignored. Here is my YAML config
notify:
- platform: pushover
name: Pushover_Emergency
api_key: API Key
user_key: USER kEY
data:
priority: 2
sound: siren
- platform: pushover
name: pushover
api_key: api kEY
user_key: User Key
Been fussing with this for a couple of days now. Config check from the GUI shows no errors.
Setting the data fields not on a global level, but on a case-by-case (per Automation) decision works fine…
With priority 2, you just have to make sure you also set an expire time, otherwise the integration/API will throw an error…
In my case, I configured this in the Pushover action:
priority: 2
expire: 1800
retry: 120
No other changes were necessary.