Attaching Images to Push Notifications

Hi all,

Considering switching from Telegram to the HA Companion app for critical alerts (alarm system).

I currently don’t run my cameras through HA but use the FTP addon to dump images there along with the folder watcher integration to trigger an image send. Currently me and Mrs are in the same Telegram group as the bot sending the images.

I understand that to dump Telegram my HA will have to host the file for the phones to download which would be fine, but I want to delete the image as soon as possible after it’s pushed to the phones so my HA isn’t full of clutter. How does everyone deal with this? I mean I can’t bake in the image delete as it might get deleted before the second phone receives the image, or worse, before either phone downloads it.


You can use actionable notification to know when a user has viewed the image or use the notification cleared event to know when they viewed it.

Personally speaking I always overwrite the same file name for each camera, makes life easier.

Not really fussed about using actionable - they’re not actionable. Does the notification cleared event carry a payload i.e. which notification was cleared, on which device?

yes it contains all data

1 Like

I see from your link that the event has an ID which I could potentially use but how does that ID relate to the original notification? I mean is it the ID of the notification or the ID of the clearing event? My cameras fire a few images in quick succession so I want the clearing of the notification to trigger the deletion of the right file. I can’t get my head around if this is possible or not.

use the image name as the tag or group attribute and look for that? The ID you see is not one provided by the app. Its more to identify the device/user.

1 Like

Think that’s probably the way to go for me, thanks. Will have a go when the family allows. Won’t mark as solution yet as I’ll no doubt have 100 more questions!

Thanks again.