Closed
Conversation
|
Channel deleted. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against eb03888 |
Contributor
Author
|
Due to the weird energy reports I have gotten from the device I see a few options to move this PR forward:
|
greens
reviewed
Jul 27, 2023
|
|
||
| if result.current_power_mW ~= nil and result.energy_today_Wh ~= nil and | ||
| device:supports_capability_by_id("powerMeter") and device:supports_capability_by_id("energyMeter") then | ||
| device:emit_event(capabilities.powerMeter.power(result.current_power_mW / 1000)) --ST uses watts by default |
Contributor
There was a problem hiding this comment.
I thought you felt safe always emitting the power events?
Contributor
|
Since I suggested it, I'm most partial to option 2. |
Contributor
|
@cjswedes Should we close this PR? |
Contributor
Author
|
I would prefer to leave it available for any developer out there to pick up, since there was non-trivial engineering time put into figuring out the message format for energy from these devices. If it needs to be closed, I will move it to a personal repo to avoid losing the work. |
Contributor
|
@cjswedes could we close this PR? |
Contributor
Author
|
😢 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Im not convinced in the energy meter reporting of this device at all, in fact it may be worthwhile to only report powerMeter capabilities for the device since it is very inconsistent in its values for energy reports (total energy fluctuates a lot including negative values, and it seems very high)
This implementation is based off the way device report payloads are interpreted here and here