This question is not about HA docker container, I am running HA as a VM.
Apart from HA I am using a couple of docker containers for which it would be nice to get notified by HA whenever there are docker container updates available.
I am using docker-compose for all of those containers, so there may or may not be easy ways to implement container update notifications.
Any suggestions on how to set up such notifications?
Then I have an automation that is triggered on a state change for that sensor. In my case I set an input boolean with the same name as the sensor so I have a visual list of stuff that needs updating (and can ignore the update by turning it off. I’ve simplified this a bit for the example, as I’m tracking other updates from things like GitHub, HACS, etc.
And then one more automation to trigger an actual notification:
alias: System Notify on Updates Available
description: ""
trigger:
- platform: state
entity_id:
- input_boolean.iperf3_image
- input_boolean.mariadb_image
- input_boolean.mosquitto_image
- input_boolean.nextpvr_image
to: "on"
from: "off"
condition: []
action:
- service: persistent_notification.create
data:
title: Updates Available
message: "{{ trigger.to_state.name }}"
mode: queued
It’s probably more complicated than it needs to be, but it does work. If you don’t need a visual list of updates, you could probably have the notification trigger in the first automation and not have the second automation at all.