Skip to content

Ensure consistent number display for gauge#8080

Merged
bramkragten merged 1 commit intohome-assistant:devfrom
spacegaier:issue-7787
Jan 4, 2021
Merged

Ensure consistent number display for gauge#8080
bramkragten merged 1 commit intohome-assistant:devfrom
spacegaier:issue-7787

Conversation

@spacegaier
Copy link
Copy Markdown
Member

Breaking change

Proposed change

Currently the entity state is converted to a Number which means that integers loose their decimal. That leads to inconsistent number formatting/rendering, since e.g. entity card or entity-row use the state directly as input for the global number formatting logic.

With this PR the conversion to Number is kept only for the NaN checks, but the gauge itself gets the original state value.

image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@bramkragten bramkragten merged commit 775e93d into home-assistant:dev Jan 4, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2021
@spacegaier spacegaier deleted the issue-7787 branch January 5, 2021 11:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing 0(s) after decimal point

3 participants