I use OH4.0.4 with my custom bundle. I see power as 18000 W as example but how I can format it as 18 kW?
channel config:
<channel-type id="heating_power">
<item-type>Numbe:Power</item-type>
<label>Heating power</label>
<state pattern="%s %unit%" readOnly="true"></state>
</channel-type>
Publish data:
case HEATING_POWER -> new QuantityType<>(String.format("%.1f kW", device.getSensorData().getPower()));
Result:
On page:
Is it possible to format value as 19.5 kW instead 19500?