Thanks for putting this together.
I have a couple of units that don’t show the self-test as a sensor in HA. Can that be made optional in the blueprint?
Another ask would be a time delay on the notifications. I’ve noticed that the nut server running on some of my routers goes unavailable and then immediately shows up as available again. I know this may be more of a circumstantial or environmental issue but having a configurable delay would be nice.
Move the ‘Enable self-test monitoring’ toggle to be above the optional entity select input
For ‘Debounce for battery notifications (seconds)’ add the word “Charge” just to make it clear what sensor it’s for. So ‘Debounce for battery charge notifications (seconds)’
Add a Load sensor and check, along with a debounce
This would be a lot like the ‘Charge’ (sensor, threshold, debounce) but would allow us to get alerted for things like if the UPS load is over 50% for more than 10 seconds.
Conditional visibility of inputs in blueprints would certainly help. I hope it will be implemented soon.
Move the ‘Enable self-test monitoring’ toggle to be above the optional entity select input
For ‘Debounce for battery notifications (seconds)’ add the word “Charge” just to make it clear what sensor it’s for. So ‘Debounce for battery charge notifications (seconds)’
I have implemented these two changes directly into the current gist. It’s straightforward and it makes sense.
Add a Load sensor and check, along with a debounce
This would be a lot like the ‘Charge’ (sensor, threshold, debounce) but would allow us to get alerted for things like if the UPS load is over 50% for more than 10 seconds.
The two UI changes look great. I’ll have to test the other - appreciate you making that so quickly.
Realized the debounce for the status is half the battle - this is my fault for not thinking it through and I haven’t done any research yet to see if there is a good solution. I should have known better as I have the same situation for another device (my well pump) I monitor via automation.
The scenario is, for example:
Debounce: 60s
Status is Online
It’s Online for 1 hr
Status goes unavailable for 30s due to network, NUT server, what not
The flake is self-resolved and Status goes back to Online
The debounce took care of it alerting for ‘unavailable’
The problem is that one it is Online for 60s, it will send an alert
Again, this is my fault as I should thought of this before even asking. On the bright side, with the debounce it cut the alerts in half
I guess it needs to, on change:
Store the old status as X, new status as Y
If the status changes for LESS than the debounce value, ignore it
If the status changes for MORE than the debounce value AND the Y=X, ignore it. If Y != X, alert
I know there is the to_state and from_state attributes but the middle ‘unavailable’ state throws a wrench in that.
This is getting much more complex, just to handle some flakiness so I don’t know that it’s worth it tbh. I think I’d leave it as is unless more people comment about it.
Good idea. I’ve implemented it. Please test it here before I’ll update it in the main/production blueprint and let me know whether it works as expected: