Continuing the discussion from Post Requests for Edge Drivers Here (community-created):
How could I customize an edge driver? For example, a thermostat in ST app might display the coolsetpoint, heatsetpoint, current temp with 1 decimal place (70.2 degrees) BUT I would like to change the temp displays to NO decimal place (70 degrees). What would be the easiest way to do that?
Probably, you will need to create your own presentation and capability.
It doesn’t worth it just because of a float value.
As @w35l3y mentioned, you might have to consider using a custom capability and define its attribute as an integer type.
For the stock capabilities of
heatingSetpoint for example, you cannot hide the extra decimal but you can do the following:
- Round the value in your integration. For example, if you get the value
70.2, you can round it to be
- Modify the range and steps allowed for the capability so the user won’t be able to enter a value with decimals. This can be done through the device configuration. For example, this configuration:
Will modify the behavior of the capability as shown in this video: