Pushing Images with Pushover 3.0

Ok, that’s pretty much what I did, except I didn’t override the base component, I named it custom_pushover. I’m going to try it later by overriding the base pushover. Thanks.:+1:

I did this and it works, thanks!

How do you do to override the base component on hass.io? Thanks

3 days later and it’s still working. looks like overriding it did the trick, thanks @moralsnipe.

@pollinolas in order to override a built-in component just give the folder the same name as the built-in component, so for this it would be: /custom_components/pushover


https://developers.home-assistant.io/docs/en/creating_component_loading.html

1 Like

Thanks a lot bro

I also tried one more time to make this work, and using a custom component overriding the original pushover component did the trick for me! I’m running the prebuilt Home Assistant container from hub.docker.com in Docker on Ubuntu 18.04. Just for clarity, I am not running hass.io, though this experience might be helpful to you.

Let me describe the steps I took in the event they might be useful to others.

  • I made a directory which will appear inside the container as /config/custom_components/pushover – for “normal” Home Assistant, this will just be in your configuration directory rather than /config

  • I created an empty file /config/custom_components/pushover/__init__.py

  • I created a file /config/custom_components/pushover/manifest.json which contains this:

     { 
      "domain": "pushover",
      "name": "pushover",
      "documentation": "https://home-assistant.io/components/notify.pushover/",
      "dependencies": [],
      "codeowners": [],
      "requirements": ["python-pushover==0.4"]
     }
    
  • I then put https://raw.githubusercontent.com/brkr19/home-assistant/dev/homeassistant/components/pushover/notify.py into /config/custom_components/pushover/notify.py

And then I had to restart the Home Assistant Container – just invoking the restart service didn’t work – it did not seem to get the updated version of the pushover library that supports attachments.

And now it works! Yay! (FYI, I’m running this on version 0.93.2 of Home Assistant.)

Previously, I tried to install this as a different custom component alongside the original pushover component, and I think there were conflicts over which version of the pushover library was going get installed.

Hope this is helpful! And it would be really nice to get this merged into the standard release of Home Assistant. I think there was a desire on the part of the developers to refactor this component (and the one the attachment logic is based on) to move that common code out. While I can see that would be a really desirable thing to do, seems like it could be done in a couple of distinct steps.

In any case, thanks for the work that was done to hack this version – it’s going to be a really nice addition to my system.

1 Like

thanks very much to all,working right now

I took these same steps in Home Assistant 0.93.2 and also running in Docker and it works. Thanks for the detailed explanation!

Would be nice to push the updated python-pushover 0.4 into home assistant dev. I wonder why this has not yet been done…

To avoid having to create a custom component, I actually forked 0.93.2 and upgraded it that way.

You can upgrade your home assistance instance with the following:

sudo -H pip3 install --upgrade git+git://github.com/rafale77/home-assistant.git@master

1 Like

Thank you very much! It works for me too :slight_smile:

Now not working with home assistant 0.94,someone else with this problem?
attachment: invalid message parameter

Not sure if this will help, but try deleting the __pycache__ folder that’s inside the custom_components\pushover folder. Also restart after you delete it.

I haven’t upgraded yet so I’m eager to know if that helped.

Did it work for you? I returned to 93.2 again

No I haven’t upgraded yet. A buddy of mine upgraded and has the same problem as you… So i’m going to hold off on upgrading mine. He did try deleting the __pycache__ folder, but no success.

Thanks for the answer, I’ll wait for some fix

Umm, well… I decided to try upgrading anyway, and it looks like pushover still works (all good with attachments). I’m running Docker btw. not Hassio.

It’s good to know, to see if someone with hass.io has the same problem and knows some solution. Thanks

I am running Hass.io, just updated to version 0.94.

Got this error:
attachment: invalid message parameter

Deleting the __pycache__ folder did not help.

Same here, waiting for fix

Sounds like maybe the old pushover library is in use (as specified by the stock component). I wonder if you restarted again if it might start using the new library. Note, kill the python process rather than just having home assistant re-exec itself. It ought not to make a dfference… but this reminds me of an issue I had where while running HASS in a Docker container, I had to restart the container to have new new library used. Just a wild guess…