-
Notifications
You must be signed in to change notification settings - Fork 61
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
Improved handling on 0 Watts spurious power reads #317
Conversation
Hi @bassrock do you mind checking if this PR does anything that impacts your solar setup? It is closing an issue raised with you original edits. I want to avoid a situation where two people keep reverting each others edits unintentionally. |
Note that I took @bassrock 's original change and comment into account – it should not affect his case (where status was undefined and watts>0) |
@alandtse yea this change is ok 👍 |
Awesome. Thanks to you both. I'll merge and get a release so it can be updated in the main component. |
fix: improve handling on 0 Watts spurious power reads (#317)
@giachello Sorry, reviving another old commit but this one is causing some issues now that I've implemented getting grid and load power for users that have the Neurio energy monitoring device. I think this solution will work but wanted to make sure it made sense with you. Basically I moved the check you added to return I updated the comments to since this is a "normal" condition for my setup which is a Tesla solar system with a Tesla inverter and no Powerwalls. The |
So the challenge is that with my setup, A Delta M with solar panels and no power wall. there are spurious reports during the day, with grid_status Unknown, and power =0 in-between valid readings with power > 0. If you report that number back instead of null, that will screw up reporting to home assistant. Will your solution work in that scenario? |
In that situation, it should just continue to use the last valid value so I think it would be the same as it currently is. The |
Also, if you're able to provide the JSON response to So far we have my setup and a Solar Edge Inverter with a Home Energy Gateway and Powerwall 2. I'm trying to gather as many different setups as I can to see how to best implement stuff for the rewrite. |
Some systems that pre-date Tesla aquisition of SolarCity will have
grid_status: Unknown
, but will have solar power values. At the same time, newer systems will report spurious reads of 0 Watts and grid status "Unknown". In this case, if solar power is 0 return null.Solves #287