-
Notifications
You must be signed in to change notification settings - Fork 9
Description
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.
pub fn unit(&self) -> &'static str {
match *self {
SetReqType::Temp => "celsius",
SetReqType::Percentage => "%",
_ => "",
}
}
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.