Pushover: Upgrading library

Hi

I am using HASS for some time now and I am still amazed by the speed and quality of development ! Cheers to all that make this possible.

My automation setup uses pushover and although the implementation is working according to the documentation on the HASS website one feature is missing : HTML formatting

Since v0.3 the same library HASS uses allows the use of HTML formatting of the message. Ive just copied the v0.3 sourcecode from the developer of python_pushover to the /srv/hass libraries.
It works as planned, all old functionality is there and the new html formatting also works.

But … it would be nice if the default library that HASS installs for pushover now can become 0.3 instead of the 0.2. I have no idea where to ask this ? Its not really a feature request I think.

Anybody ?

regards
Cor

1 Like

I’ll work on a PR for this. Can you share how you tested version 0.3?

PR: home-assistant/home-assistant#9045

My test was very simple, I have a running HASS setup that uses many options of pushover:

  • sound
  • priority
  • verify
  • expire

When I copied the 0.3 pushover onto the version in /srv/hass (whilst first making an old copy) things are still working as planned (tested). I now also use calls with html as a keyword.

I run most of my stuff from Appdaemon scripts, made a function I can call easy:
title and message are the defaults and data can contain additional json keywords.
self.call_service(“notify/pushover”, title=title1, message=message1, data=data1 )

regards
Cor

Well, my PR was just merged so the change should be included in the next release :slight_smile:

1 Like

Great, thanks for the cooperation :smile:

1 Like

Are you getting priority to work? I can’t seem to do it from my script. The code below works as is, but not if I add the priority=2-attribute. I’m running 0.55.

send_notification:
  alias: Send a notification message
  sequence:
    - alias: Send notification
      service: notify.pushover
      data_template:
        message: "{{ msg_body }}"
        title: "{{ msg_title }}"

Pushover in hass is a little strange. To get priority to work you need to add another data section for metadata to your data template. The config below should work.

send_notification:
  alias: Send a notification message
  sequence:
    - alias: Send notification
      service: notify.pushover
      data_template:
        message: "{{ msg_body }}"
        title: "{{ msg_title }}"
        data:
          priority: 1

If you would like to use priority 2 you will need to provide some additional data which can be found in the pushover api doc’s. https://pushover.net/api#priority

1 Like

Thanks, got it to work based on your advise!