-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for nut's powervalue config per-device #292
Conversation
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
Boop |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
boop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks @lozzd 👍
../Frenck
Perfect!
Thanks for the merge. |
Proposed Changes
I'm monitoring a couple of UPS that don't have any relation to supplying power to the rPI where HA is running, so I want to prevent the battery going flat on those UPS from shutting down the rPI unneccessarily (while also keeping the one UPS that does supply power being able to shut down the rPI)
nut
has a concept for this, an option called the "powervalue" in the list ofMONITOR
configs inupsmon.conf
That value is currently hardcoded to
1
, so all UPS that are configured will trigger shutdown if the battery gets low.From the docs:
This is my attempt to allow that to optionally be set. Since it's not related to the items commonly placed in to the
config
array on each device, I put it at the top level of tehdevice
, (e.g. likeport
ordriver
)Docs update is in the PR also.
Note that this value does also allow people to introduce the concept of controlled shutdowns if they have two power supplies on their HA host. I assume there are very few people doing this, but it's an option.
I am not experienced in how add-ons are written and tested, so I must admit this is an untested PR.
Thanks!
Related Issues
N/A