dannerph / homeassistant-solcast

Apache License 2.0
19 stars 3 forks source link

Strange error message when API limit exceeded #8

Closed B-Hartley closed 3 years ago

B-Hartley commented 3 years ago

Thanks for writing this, it's very useful for me in calculating how much to charge my powerwall overnight.

Tried to call the update_forecast service I have run out of API requests today.

Received the following error.

Failed to call service solcast/update_forecast. 'bool' object has no attribute 'get'

Can you check how this situation is caught as it doesn't seem to work.

Thanks, Bruce.

dannerph commented 3 years ago

ah I see, small mistake in error handling, fetching method returned false, the rest of the code tried to interprete it as json. Should be fixed with latest release (quick and dirty but working)

B-Hartley commented 3 years ago

Thanks. Appreciate the quick response.