diff --git a/octopus_energy/rest_client.py b/octopus_energy/rest_client.py index 3aab1b1..45d521f 100644 --- a/octopus_energy/rest_client.py +++ b/octopus_energy/rest_client.py @@ -332,7 +332,7 @@ async def _execute( """Executes an API call to Octopus energy and maps the response.""" url = self.base_url.copy() url.path.segments.extend(url_parts) - url.query.params.update(query_params) + url.query.params.update({p: v for p, v in query_params.items() if v is not None}) response = await func(url=str(url), **kwargs) if response.status > 399: if response.status == HTTPStatus.UNAUTHORIZED: diff --git a/pyproject.toml b/pyproject.toml index 7050176..3a1ae73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "octopus-energy" -version = "0.1.8" +version = "0.1.9" description = "Python client for the Octopus Energy RESTful API" authors = ["Mark Allanson "] license = "MIT"