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.
I was getting astronomical figures reported to Powerpal Cloud!
Turned out the "Watt Hours" sensor was off by a factor of my meter pulse rate (3.200) squared. After some quick algebra I realised the calculation inside this module was incorrect.
For reference, my
rest_command
looks like this:and I have an automation that kicks off for each change to the "Daily Pulses" sensor:
Interestingly, I noticed that the "Powerpal Timestamp" sensor only seems to update every 2-3 minutes, instead of every minute. It appears that while a set of values is produced every minute, sometimes the timestamp in the BLE packet doesn't change, so in my automation I have just used
now() | as_timestamp | int // 60 * 60
, which seems to do the trick.