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
srp_energy component not working: Value error connecting to SRP. too many values to unpack (expected 4) #18899
Comments
Seems like this issue is caused by the data containing an unexpected extra column. In my case this is the 'rate' column that defines whether the power was consumed on-peak or off-peak. Here are the parts of the code that are probably throwing the error: history = [{
ATTR_READING_TIME: isodate,
ATTR_READING_USAGE: kwh,
ATTR_READING_COST: cost
} for _, _, isodate, kwh, cost in self._usage] for _, _, _, kwh, _ in usage:
daily_usage += float(kwh) I'm not sure what the solution is, since it seems like not everyone will have this extra 'rate' column. I guess we'd have to strip that column out of self._usage if it exists? |
Has there been any progress on this? I would be happy to provide test data or do what I can to help. |
No progress from me on this. I will see what I can do this week. It should be a relatively easy fix I just don't have any kind of HomeAssistant development environment setup right now. |
It looks like this was fixed in srpenergy 1.0.6 and pushed to PyPI so if we change line 22 to |
FYI, just tested this as a custom component and it works. No more error and the sensor is being loaded with the data from SRP. |
@keassol Mind marking that PR "approved" then? |
Getting an error on startup when using the srp_energy component.
Error:
Value error connecting to SRP. too many values to unpack (expected 4)
Config:
AdrianG on the forums is getting the same error: https://community.home-assistant.io/t/srp-energy-sensor-added-in-83-not-working-getting-errors/81804
The text was updated successfully, but these errors were encountered: