I have an Unit of Measurements item of say
Number:Energy type and want to make that enterable from mainUI using a oh-stepper-item widget.
Now if I do, the item is set to the pure Number, without the unit.
How can I avoid that and get say
1.1 kWh set as the item value ?
I know I have to give some initial hint to indicate the UoM unit, but setting the item does not help, it still gets overwritten by the pure Number.
I’ve seen a “unit” YAML parameter but didn’t find docs on that and it does not seem to take effect either.
FWIW, I want to avoid changing widget type to string or whatever and do some own validation/conversion processing. I also want to avoid using workaround such as rules that re-set items if changed via UI (as among other drawbacks, it isn’t guaranteed that the correction rule takes effect before other rules).