I am creating a custom card which includes calculations on some numeric entity values.
If I was formatting an Entity directly on the frontend, I would use the hass.format*
methods (e.g hass.formatEntityState
), to format using the users Number formatting preferences. (see Entity state formatting)
But there does not appear to be a method to just format any number using the users Number formatting preferences.
Does anyone know how to do this?