You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var displayVal = hass.formatEntityState(hass.states[sensor[attr]]);
Around line 305.
But as we hide the unit on small screens, we would need to split the unit from the number and do some various validations anyway, so maybe this is not really feasible. After all, the WS sends the info from the sensor, so it should be correct.
Although #39 could possibly be fixed by this?
Are there other ways to get precision for a sensor from the hass-object?
Replace hard coded labels and units of measurement with https://developers.home-assistant.io/docs/frontend/data#entity-state-formatting
This allows us to simplify the WS data and ensures consistent values.
The text was updated successfully, but these errors were encountered: