Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for returning zero erroneously #36460

Closed
wants to merge 1 commit into from
Closed

Conversation

abzman
Copy link

@abzman abzman commented Jun 4, 2020

Fix for returning zero erroneously: error on a value of exactly 0.0000W. This happens sometimes and in all normal use cases does not represent accurate data, usually the homeassistant server is powered from the utility power and draws something. This allows scripts to use "if total power less than X" without them triggering periodically by mistake.

Breaking change

Proposed change

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

Example entry for configuration.yaml:

# Example configuration.yaml

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.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

Fix for returning zero erroneously: error on a value of exactly 0.0000W.  This happens sometimes and in all normal use cases does not represent accurate data, usually the homeassistant server is powered from the utility power and draws something. This allows scripts to use "if total power less than X" without them triggering periodically by mistake.
@homeassistant
Copy link
Contributor

Hi @abzman,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@project-bot project-bot bot added this to Needs review in Dev Jun 4, 2020
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 for the PR! However, we can not accept this PR since this integration should use a 3rd party library for its device interface. See comment below.

@@ -104,6 +104,18 @@ def update(self):
return

val = float(response_split[0])

# A workaround for a bug in the DTE energy bridge.
Copy link
Member

Choose a reason for hiding this comment

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

These quirks should be handled by a 3rd party library. We won't accept more changes to this integration until the device specific interface code and data parsing has been moved to a standalone library published on PyPI.

https://developers.home-assistant.io/docs/creating_component_code_review#4-communication-with-devicesservices

Dev automation moved this from Needs review to Review in progress Jun 5, 2020
@stale
Copy link

stale bot commented Jul 5, 2020

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@stale stale bot added the stale label Jul 5, 2020
@stale stale bot closed this Jul 12, 2020
Dev automation moved this from Review in progress to Cancelled Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Dev
  
Cancelled
Development

Successfully merging this pull request may close these issues.

None yet

3 participants