Hello everyone, I hope this message finds you well! I wanted to share a quick tip and a bit of my experience regarding automation notifications in Home Assistant. I’ve been using a value_template to notify myself whenever a new version is available, but I’ve been facing an issue where I keep getting notifications for beta versions, which I’d rather avoid.
Here’s a bit of my setup:
condition: template
value_template: ‘{{ states.sensor.hass_current_version.state != states.sensor.hass_installed_version.state and states.sensor.hass_current_version.state != “unavailable”}}’
This works well for detecting updates, but I rolled back from beta due to some issues with my Xiaomi devices. Every five minutes, I get a notification about a new beta version, which is quite annoying. I know I could unsubscribe from beta updates, but I thought it might be a good learning experience to figure out how to tweak the automation instead.
I started wondering if there’s a way to add a condition that ignores versions containing the word ‘beta’. After some research and trial and error, I found that using a template with a conditional check could help. I ended up modifying the value_template to exclude beta versions by checking if the version string contains ‘beta’. Here’s how I adjusted it:
value_template: ‘{{ (states.sensor.hass_current_version.state | string) != states.sensor.hass_installed_version.state and (states.sensor.hass_current_version.state | string) != “unavailable” and (“beta” not in states.sensor.hass_current_version.state | string) }}’
This change has been a lifesaver! Now, I only get notifications for stable releases, and the constant beta alerts are a thing of the past. It’s a small tweak, but it makes a big difference in keeping my notifications relevant and not overwhelming.
I’d love to hear if others have similar experiences or if there are even better ways to handle version notifications. Maybe someone has a more elegant solution or additional conditions they use. It’s always great to learn from the community!
Happy automating, and I hope this tip helps someone else out there!