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

Network UPS Tools (NUT) integration status messages #130622

Open
bonanitech opened this issue Nov 14, 2024 · 6 comments
Open

Network UPS Tools (NUT) integration status messages #130622

bonanitech opened this issue Nov 14, 2024 · 6 comments
Assignees

Comments

@bonanitech
Copy link

The problem

I'm probably being picky, but I think the status messages should be separated by a comma and not by a space.

SCR-20241114-iibm

It's weird reading "On Battery Battery Discharging".

"On Battery, Battery Discharging" looks better, IMHO.

What version of Home Assistant Core has the issue?

2024.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Network UPS Tools (NUT)

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nut/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @bdraco, @ollo69, @pestevez, mind taking a look at this issue as it has been labeled with an integration (nut) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of nut can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign nut Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


nut documentation
nut source
(message by IssueLinks)

@bonanitech
Copy link
Author

For example, the nut package for pfSense shows the status messages separated by a comma.

SCR-20241114-iuqf

It looks better, right?

@bonanitech
Copy link
Author

return " ".join(STATE_TYPES[state] for state in status[KEY_STATUS].split())

Would this change do what I'm asking?

-        return " ".join(STATE_TYPES[state] for state in status[KEY_STATUS].split())
+        return ", ".join(STATE_TYPES[state] for state in status[KEY_STATUS].split())

@tdfountain
Copy link
Contributor

I believe that change will accomplish what you want. I agree that it would improve readability.

@jonandel
Copy link

Hey there @bdraco, @ollo69, @pestevez, I nitice that the NUT integration has finally solved the problem (reportedly) of incorrect input and output voltages introduced for a range of branded UPS's.....oh about a year ago (I forget which revision). But claimed fixed this week ! Any chance we can have that integrated into Core HA ?

@tdfountain
Copy link
Contributor

It would be best to open a new Issue when tracking a different problem or request. The issue raised by @jonandel appears to be different.

The item referenced appears to be with regard to Issue #95157 which is continued at NUT Add-on Issue #305. The issue was opened in the NUT repository as NUT Issue #1973 and recently (potentially) fixed with a PR to NUT. The Home Assistant NUT Add-on repository can be found here.

At a very high-level, the relationship is:

Home Assistant --> Home Assistant Core NUT integration --> Home Assistant NUT Add-on --> NUT

Home Assistant includes Core with a NUT integration. That calls a NUT server, which in your case is provided by Home Assistant NUT Add-on. The Home Assistant NUT Add-on is built from a Debian distribution which includes a set of packages. One of those packages is NUT.

The PR you reference will work its way through a series of releases. The first is that NUT will eventually package together a new release (perhaps 2.8.3) that includes the referenced PR. NUT has a recent history of creating new releases roughly yearly. You will need to inquire with the NUT maintainers when the next package may be released. Home Assistant Addons use a common Debian distribution. That Debian distribution will eventually be updated to include newer NUT packages. The Home Assistant Add-on for NUT will then be updated with a newer Debian distribution. Once updated, you can install the updated Add-on which will contain a newer NUT package.

This Issue was posted to the Home Assistant Core repository which includes the Home Assistant's integration to NUT. It does not provide the NUT package itself.

If you do not want to wait for these upstream package releases, you may want to build and run your own version of NUT from the repository and/or create your own Home Assistant NUT Addon.

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

No branches or pull requests

4 participants