-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
APC UPS Daemon sensor entities have spaces at the end of numerical states #81476
Comments
Hey there @yuxincs, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) apcupsd documentation |
I don't know what's up with this, but I came back into that integration page about 5 minutes after I logged this bug, and all the entities are there now. But man, I took screenshots :) There were only 8 when I added it. |
I'm going to tag onto this bug with this issue too, because I don't feel like opening up other issues: States of the entities seem to have trailing spaces, and are interpreted as strings, even for numeric values
This makes it weird when you try to format the value with its
and more importantly, can't be used by |
IT seems to be only the numerical values that have this issue. The string and date formatted entity states seem OK.
It would also be cool if the |
@yuxincs, I suspect the issue is this line (though I could be wrong)
As the string from NIS is So (I think) the code is only removing the length of the unit, not the space as well from the input string. I'm surprised there isn't a type conversion somewhere as well (to Also looks like it needs a Good catch @SteveDinn. |
Nice catch, all! I noticed this bug as well when I was adding tests to prevent regressions for future development. That indeed seems to be causing the problems here. I'll find some time to fix this soon, but if any of you like to create a PR, please do 😃 |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
This is still an issue. Back off |
So, I think this issue is fixed by #93724 as well, which properly removes the leading spaces when splitting the numeric value and the unit from the raw strings 😃 |
Well a fix is proposed. I'm not holding my breath for the Devs to accept it :) |
The PR is actually already merged, I believe you'll see it working in next release several days later :) |
The problem
I added the integration for my APC UPS and I was presented with 8 entities:
However, when I examine one of these entities, and look at the 'Related' tab, I see many, many more. Shouldn't these all be listed on the integration page?
What version of Home Assistant Core has the issue?
2022.11.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
APC UPS Daemon
Link to integration documentation on our website
https://www.home-assistant.io/integrations/apcupsd
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
The text was updated successfully, but these errors were encountered: