-
Notifications
You must be signed in to change notification settings - Fork 23
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
Use UnitOfDataRate #90
Comments
+1. MB/ps is kinda confusing. "ps" = pico second? |
released new version with fix for it, v2.0.25, pls check and let me know if works for you thanks |
Thanks for looking into this. I have "MB" as the unit (was set to MBytes previously), but I see tx/rx rates in several millions. I think the reported values are in bytes. |
checking |
found it and released new version with fix for it, v2.0.26 thanks |
@elad-bar Why copy my PR instead of merging it? I also still don’t see any usage of the units declared by HA as said in my first comment. |
sorry for that, because I changed the code and done major code refactor which messed up your PR (which I saw yesterday after doing the refactor), i though I sent a message after doing the code refactoring and once noticed earlier today the the message was not sent in the PR, I manually update it according to your files and added credit as you deserve :) again, thanks! and sorry for the mess |
Thx for the explanation and to have sync my PR with your refactor 👌 |
thanks! works as expected now. |
@elad-bar About my first comment, and the reason of this ticket. Can you use the official units of measurement in your integration. I gave you the linked in the same comment. Doing this, and adding a device class for each sensor will allow your integration to expose unit conversion and so you will be able to remove all the logic around this. For instance, with Synology you can see |
B, KB and MB which are used are part of the official unit of measurement - the fact whether I state them manually or using the enum doesn't matter, hope it covers the need |
It will covers my need indeed. Thx. About the enum or constant vs your own hardcoded values will just help to be always in sync with HA. But I agree, the UI for the end user will be the same. FYI, I wanted to contribute to your integration to do it myself. But the arch apply here does not look like the other components I usually work on (overkiz, and toshiba for instance). |
Thanks for the feature request and attempt to refactor it, |
please check release v2.0.27 thanks |
@elad-bar That’s perfect! Much more user friendly and in the HA philosophy. |
thanks for suggesting it and sharing that feature, was not aware of it |
Hi, thank you for your component. The number of information retrieved is great!
I have one remark related to the rate unit. Currently, it looks like MB/ps, which is weird. It should be MB/s or MBps. So I dig in the source of this repository, and I noticed that UnitOfDataRate is not used or even UnitOfInformation.
It would be great if you used these constants so this component will behave more others one.
The text was updated successfully, but these errors were encountered: