Skip to content
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

Change UPS backup time from seconds to minutes/hours? #12

Open
snagglewest opened this issue Mar 8, 2023 · 3 comments
Open

Change UPS backup time from seconds to minutes/hours? #12

snagglewest opened this issue Mar 8, 2023 · 3 comments

Comments

@snagglewest
Copy link

snagglewest commented Mar 8, 2023

Thank you for this very handy plugin!

I'm running the most recent version of the NUT_UPS plugin on a Raspberry Pi3 with a CyberPower LE1000DG UPS.

Everything works great but the UPS backup time is reported in seconds which is not very intuitive. I'm guessing this is probably dependent on the UPS brand so I'm not sure this is really a "feature request", more of a "is it possible" with some simple file editing?

I'm not a programmer by any stretch but I poked around a bit in the files and nothing jumped out at me. If it's easily possible could someone point me in the right direction?

Thanks in advance!

@999LV
Copy link
Owner

999LV commented Mar 8, 2023

Thanks for the appreciation.
The way the NUT UPS standard reports the backup time is in seconds, hence the plugin’s behavior. It can easily be changed to minutes though by minor tweaking of the code, even if you are not a hard core programmer.

@snagglewest
Copy link
Author

Thank you for the quick response! I'm assuming it's making a change to plugin.py, could you tell me what to add or change? I'm comfortable with CLI and editing files but interpreting the code is not my strong point.

Thank you

@snagglewest
Copy link
Author

Maybe a small hint were to start???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants