Predefined units for attributes?

I have noticed that for some custom attributes are predefined units in code?

It is not possible as sample for Pressure to define something else (“psi” is preset - “mbar” will be added…):
grafik

Is there a reason for this and a list of such attributes?

Thanks!

Which integration are you using? It should read the actual units from the device.

Plugins are different. Those currently do use fixed units. There currently isn’t a way to change the units if you’ve written a custom plugin. To omit units in labels you can add “.Value” to the end of your binding or you can have your plugin use a different attribute name.

I made an own plugin.

Have defined an attribute “Pressure” to the device, read a value from JSON and assign it to the attribute.
From system will be added the “psi” to the value by default.

Same have seen for some other attributes - I have renamed i to shorter names, then it was working.
That’s why asking for a list of such attributes with assigned units.

Thanks!

Using it in this time at PC (while programming) located in Germany (metric values by default).

Adding the “.Value” help, thanks.

Nevertheless not clear why for some attributes will be added a unit - and why they are “wrong” (for my region).

Defining units in custom Plugins is a feature that hasn’t been finished yet. It is planned but I can’t give you a date on when it will be ready.