Skip to content

Commit

Permalink
fix: len(requests) - 'NoneType' has no len()
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Aug 12, 2024
1 parent 6f9e9e7 commit e25280f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/solarman/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async def async_get_failed(self, message = None):
async def async_get(self, runtime = 0):
params = ParameterParser(self.parameter_definition)
requests = params.get_requests(runtime)
requests_count = len(requests)
requests_count = len(requests) if requests else 0
results = [0] * requests_count

_LOGGER.debug(f"Scheduling {requests_count} query request{'' if requests_count == 1 else 's'}. #{runtime}")
Expand Down

0 comments on commit e25280f

Please sign in to comment.