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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sensor.py #79

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Update sensor.py #79

wants to merge 2 commits into from

Conversation

popler
Copy link

@popler popler commented Jan 6, 2024

Added Total backwards energy for dlq

Description

Added Total backwards energy for dlq eg. for SPM02 breaker

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [ x] Local Testing

Diagnostic File

Please include HA diagnostic file to help us understand and reproduce the issue.

Checklist:

  • [ x] My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [ x] My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Added Total backwards energy for dlq
Define CUR_NEUTRAL
@shihuimiao
Copy link
Collaborator

can you offer Diagnostic File?

@popler
Copy link
Author

popler commented Jan 8, 2024

Do you mean diagnostic file from HA?

@shihuimiao
Copy link
Collaborator

Do you mean diagnostic file from HA?

yes, device diagnostic file

@popler
Copy link
Author

popler commented Jan 9, 2024

@focabr
Copy link

focabr commented Feb 18, 2024

I hope everyone is well.

I have the same equipment and I'm in need of that same functionality.

I will send you my device diagnostic file to your evaluation too.

smartlife-fcce016c75404b557fd3965a851d55bc-SPM02_WiFi-7e46348015b57f314c513673c11bea17.json

PS. I noticed that in the 2 diagnostic files the correct name would be total_forward_energy https://github.com/tuya/tuya-smart-life/blob/dev/custom_components/smartlife/sensor.py#L744 , you may also notice that there is Issue https://github.com/tuya/tuya-smart-life/issues/109 with this same problem. In this way, we will be in accordance with the published documentation https://developer.tuya.com/en/docs/iot/s?id=Kb0kikd1lya17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants