Send file via pushbullet

Hi, I might just miss the obvious but how can i send a file via AD->HA-> push bullet?

Service tab:

{
“message”: “A message for many people”,
“data”:{“file”:“/tmp/cam106.jpg”}
}

works fine.

But

self.call_service(“notify/pb”, data=“{"file": “+fn+”}”, message=“test”)

fails with

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://192.168.2.84:8123/api/services/notify/pb

any idea?
JKW

i think thats all about quotes.

data expects a dict and not a string so i would try something like:

self.call_service("notify/pb", data={"file": "/tmp/cam106.jpg"}, message="test")

thanks for your quick help, that did it

1 Like