I’ve got a description value I’m trying to create
heating_morning_description.postUpdate(String::format("Morning: Time on: %s Time off: %s Max Temp: %1s °C",heating_morning_time_on.state,heating_morning_time_off.state,max))
max is a var Number (only done because leaving just the item .state or putting item .state as DecimalType wouldn’t work.
So as it stands, the max value in the description becomes: 18.199999999999985 °C
I’d like to push that down to 1 decimal place.
I’ve tried Max Temp: %f and get f != org.eclipse.smarthome.core.library.types.DecimalType
I’ve tried Max Temp: %d and get d != org.eclipse.smarthome.core.library.types.DecimalType
Where am I going wrong?