Thanks for explanation. I already changed it for my HA instance, getting slowly used to that YAML stuff.
Not quite long on board so good point if there are cases like forced rollbacks (where an update actually is a downgrade) it´s probably even better to not use the greater than operator instead use your setting or rely on the update_available information. Would depend on what those states are in a “forced rollback/downgrade” scenario, for the moment I´m fine.
And once again: many many MANY thanks for this topic, this was exactly what I was missing out of the home assistant box and you served it, just perfect.
Hi Guys, I hope someone here can help me.
I’m trying to set up a sensor to show the current and latest version of an addon with the steps provided in this thread.
I’ve been trying to get this sensor to work for a few days now. But for some reason it just doesn’t create the sensor. Whenever I try to find it, it just doesnt show up.
Well to start you probably have to add verify_ssl: false to your sensor. Since that’s a local IP address whatever SSL certificate you are presenting is either self-signed or for a different domain entirely since CAs won’t issue SSL certificates for private IP addresses.
Also it looks like you’re providing Content-Type: application/json as a header which is weird since its a GET call and has no request body. Did you mean to put Accept: application/json to specify that you want JSON back? Not sure if that’s necessary or not but it makes more sense then providing Content-Type without a postbody.
Also only you can verify this but make sure your llt_addons secret is of the format Bearer <a valid token>.
I’m guessing it was blowing up on the SSL certificate since it looks correct other then that. Maybe the extraneous Content-Type header but most APIs just ignore that on a GET call.
Huh, that is really confusing. I’ve had issues with not receiving notifications before due to end device state but never with ha not firing an automation when it obviously should. If you go to developer tools you can manually set binary_sensor.updater to on and off to test it. Does it work when you do that at least?
it’s hard coded for that binary_sensor. This thread gives you other ways to be notified almost immediately so if that is a concern for you, use that rather than the binary sensor.
Yea that’s my bad, I need to update that. Early on after I posted it and started using this package one of the first things I noticed was that binary_sensor.updater was wayyyy too slow for me. When I started digging into making update sensors for the other components of supervisor (after @DavidFW1960 pointed it out actually) I realized I should just make my own for core. I mentioned it here:
There’s two packages on the initial post. One is the base package that I posted initially, the second one includes a lot more update sensors for the various supervisor components and includes a much faster sensor for core. Here it is if you want to add it. With this one you can set the scan_interval to whatever you want:
Until now I checked if the updater sensor switched to “True” to fire my notification.
That obviously didn´t work reliably, maybe (wild guess) because that switch to “True” sometimes happens during HA restarting and the automation doesn´t get triggered (due to maybe HA not being fully started yet?).
Now I´m thinking of setting a time pattern as trigger (e. g. “every 3 hours”) and setting the check if sensor state is “True” as a condition.
Problems with this strategy:
Obviously:
notifications/actions will be fired every time according to time pattern. Receiving a notification ONCE is enough… don´t know how to work around that from the automation perspective
Possibly:
ending up in the same situation (automation not getting triggered).
I was wondering how you guys set up your notification automations.
So still a complete miracle to me why it´s not reliably working… (one indication: there is a correlation between automations not being triggered when sensor state changes and at the same time or only few minutes before HA is being restarted)
History should contain an entry like Has been triggered by state of sensor.updater_addons @ roughly 19:02:XX - but it doesn´t
Let´s see what others use or if someone has an idea.
I have had issues with triggers not firing when the state changed during a restart. I can’t think of any specific examples off the top of my head but it is something I’ve struggled with before.
But I actually don’t use automations at all with update notifications. In the package at the top you can see there’s a whole bunch of alerts, that’s what I use. They’re basically automations specifically for the use case of notifying you of a situation.
I have noticed with alerts that occasionally I’ll miss the first one for a similar reason (state changed during a restart). But that’s not a big deal with alerts since they have a built-in reminder feature so I’ll get the second one even if I somehow miss the first.
I’ve never seen that. Really don’t know what to make of that. Might have to report a bug I guess but its not something I’ve ever seen and I use tons of alerts in my system for all sorts of things.