hass-fpl icon indicating copy to clipboard operation
hass-fpl copied to clipboard

Missing projectedKWH key

Open dannytrigo opened this issue 2 years ago • 1 comments

When trying to add the integration I get the following error:

  File "/config/custom_components/fpl/fplapi.py", line 313, in __getDataFromEnergyService
    data["projectedKWH"] = r["CurrentUsage"]["projectedKWH"]
KeyError: 'projectedKWH'

dannytrigo avatar Apr 29 '22 17:04 dannytrigo

It seems this may be related to an error on my account maybe? But might require better error handling: This is the content of r["CurrentUsage"]:

{'accountNumber': '...', 'premiseNumber': '...', 'exceptionDetails': {'requestStatus': 'Failed', 'resultCode': 'ex022', 'resultInfo': 'Processing Error'}, 'billDiff': '', 'previousBillRead': '', 'currentBillRead': '', 'todayMeterRead': '', 'previousBillAmount': '16.96', 'delMtrReading': '43026', 'recMtrReading': '', 'nextBillDate': 'May 04, 2022'}

dannytrigo avatar Apr 29 '22 17:04 dannytrigo