From 935b6575e4c2c996fda58bd983fb81aef44a85aa Mon Sep 17 00:00:00 2001 From: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:29:08 +0100 Subject: [PATCH] Make zone key upper case in latest_carbon_intensity_by_country_code (#103) --- aioelectricitymaps/electricitymaps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aioelectricitymaps/electricitymaps.py b/aioelectricitymaps/electricitymaps.py index b07be91..ecc7710 100644 --- a/aioelectricitymaps/electricitymaps.py +++ b/aioelectricitymaps/electricitymaps.py @@ -89,7 +89,7 @@ async def latest_carbon_intensity_by_country_code( code: str, ) -> CarbonIntensityResponse: """Get carbon intensity by country code.""" - result = await self._get(ApiEndpoints.CARBON_INTENSITY, {"zone": code}) + result = await self._get(ApiEndpoints.CARBON_INTENSITY, {"zone": code.upper()}) return CarbonIntensityResponse.from_json(result) async def zones(self) -> dict[str, Zone]: