8000 Remove invalid unit of measurement from Glances by frenck · Pull Request #73983 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove invalid unit of measurement from Glances #73983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2022
Merged

Conversation

frenck
Copy link
Member
@frenck frenck commented Jun 25, 2022

Proposed change

Removes an invalid unit of measurement from Glances.
As per review comment here: #73049

Type of change

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

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

Hey there @engrbm87, mind taking a look at this pull request as it has been labeled with an integration (glances) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Jun 25, 2022
Copy link
Member
@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member
@bdraco bdraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as there is a state class, logbook will still exclude it.

I'm assuming thats why it was added in the first place (but it could be another reason)

@avee87
Copy link
Contributor
avee87 commented Jun 26, 2022

I'm assuming thats why it was added in the first place (but it could be another reason)

One of the reason I suspect empty unit is being added in some integrations is that without unit entity view shows a logbook card rather than a chart. Compare these screenshots.

No unit of measurement:
Screenshot 2022-06-26 at 01 14 16

Empty string unit of measurement:
Screenshot 2022-06-26 at 01 14 26

This is also "fixed" by adding state_class.

@MartinHjelmare
Copy link
Member

Yes, that was the old way of solving that problem. Since we now have the state class feature, we no longer allow setting an empty string as unit of measurement.

Kane610
Copy link
Member
@Kane610 Kane610 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@frenck frenck force-pushed the frenck-2022-1311 branch from ffee9bf to 2edb06f Compare June 26, 2022 12:56
@frenck
Copy link
Member Author
frenck commented Jun 26, 2022

Rebased to see if the CI issue has been resolved.

@frenck
Copy link
Member Author
frenck commented Jun 26, 2022

One of the reason I suspect empty unit is being added in some integrations is that without unit entity view shows a logbook card rather than a chart. Compare these screenshots.

If that is still an issue, please create an issue with the frontend repository. We should not add workarounds in the backend to work around an issue in the frontend.

@frenck frenck force-pushed the frenck-2022-1311 branch from 2edb06f to febbb03 Compare June 27, 2022 23:06
@frenck
Copy link
Member Author
frenck commented Jun 27, 2022

Rebased to deal with our CI issues.

@frenck frenck merged commit 09dca3c into dev Jun 27, 2022
@frenck frenck deleted the frenck-2022-1311 branch June 27, 2022 23:46
@github-actions github-actions bot locked and limited conversation to collaborators Jun 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix cla-signed integration: glances small-pr PRs with less than 30 lines. smash Indicator this PR is close to finish for merging or closing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0