Open flatsiedatsie opened 6 years ago
(totally not a priority I would say, things will work just fine if this whole V_UNIT_PREFIX thing is not implemented at all.)
This is interesting idea. For this the controller needs to store the unit prefix of sensor while it is presented and that has to be exposed in WoT api. I'll think about how to handle it better.
I don't know what I'm talking about, but currently the "UnitPrefix" data type seems a bit strange. Right now it can be a property of a thing. This results in something like "pressure" being displayed as a separate string in the interface (in the cases that a MySensors device actually sends a prefix along)
When I looked at set.rs I noticed that there actually is a way to set the pre/postfix of a device.
Shouldn't the UnitPrefix data (if MySensors sends it at all) end up in that list?
From my limited understanding, for a device that measures barometric pressure it should send the string "mBar" as the V_UNIT_PREFIX.
V_UNIT_PREFIX is only sent once I think, when the device starts. It has the same child ID as the actual sensor data that will be coming in after it.