-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
unit_of_measurement for linkquality missing in HA #2806
Comments
Link Quality Indicator (LQI) is the quality of the real data received in a signal.It ranges from 0 to 255, with 255 being the best quality. Therefore, there is no unit_of_measurement, as shown by the "-" |
Would it not still be perfectly possible to translate those values to a more consumer friendly 0-100 and make the unit of measurement ”%”? |
Including this functionality into zigbee2mqtt is a philosophical question and beyond my pay grade. But if you really want this now, it's as easy as creating your own template sensor
Voila |
I know i could do that for my 18 sensors, but that's not what I’m asking 😏 |
Maybe just use “lqi” as unit. Besides that I would recommend to use device_class “signal_strength” as default class for all these Linkquality sensors. Currently I have to manually customize that each time. |
@groenmarsmannetje done, unit will be |
@Koenkk the dev build got broken after these changes, I assume the tests have failed? |
On a side note, I've asked on Home Assistant discord if there would be an interest in having a "lqi" device class of sorts! |
@pedrolamas thanks, fixed the tests. |
This feels a bit unnecessary and kind of "hacky" to me... All these sensors end on "_linkquality", so it was quite easy to configure them globally anyway with the "*_linkquality":
unit_of_measurement: 'lqi'
icon: mdi:signal You can check here an example in my own configuration. |
@pedrolamas why do you think it's hacky? |
Probably a bit of a strong word there (sorry!), but I think this should just be provided on a new device class on Home Assistant rather than having the HA extension supply this metadata. |
@pedrolamas yes I agree it should be in a device class, let's see if they'll add it. |
Thank you for that tip. I did not know that something like that existed. But of course this probably only works for people using yaml files. Because the architectural view from HA is that integrations and customizations should also be configurable in the front end. Can I do this without editing yaml files? |
Maybe it should be configureable in Z2M. Also we show follow this issue on HA: home-assistant/architecture#342 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I assume this can be closed, unit is not set to |
Improvement:
On all my sensors (hue, Ikea and Xiaomi) the unit_of_measurement value for linkquality (dB or % whatever is appropriate) is missing.
Debug Info
zigbee2mqtt version: 1.9.0
It would be nice of you could add this.
The text was updated successfully, but these errors were encountered: