From dc861efc5769ffbc144dc2f4358b482d195e7c27 Mon Sep 17 00:00:00 2001 From: Lewis Juggins <873275+lwis@users.noreply.github.com> Date: Thu, 26 Dec 2024 20:05:35 +0000 Subject: [PATCH] Tidy up old func --- .../octopus_energy/api_client/__init__.py | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/custom_components/octopus_energy/api_client/__init__.py b/custom_components/octopus_energy/api_client/__init__.py index d8ba505c..1a3c6d72 100644 --- a/custom_components/octopus_energy/api_client/__init__.py +++ b/custom_components/octopus_energy/api_client/__init__.py @@ -880,27 +880,6 @@ async def async_get_heat_pump_configuration_and_status(self, account_id: str, eu _LOGGER.warning(f'Failed to connect. Timeout of {self._timeout} exceeded.') raise TimeoutException() - async def async_get_heat_pump_lifetime_performance(self, euid: str): - """Get heat pump live performance""" - await self.async_refresh_token() - - try: - client = self._create_client_session() - url = f'{self._base_url}/v1/graphql/' - payload = { "query": heat_pump_lifetime_performance.format(euid=euid) } - headers = { "Authorization": f"JWT {self._graphql_token}" } - async with client.post(url, json=payload, headers=headers) as heat_pump_response: - response = await self.__async_read_response__(heat_pump_response, url) - - if (response is not None and "data" in response and "octoHeatPumpLifetimePerformance" in response["data"]): - return OctoHeatPumpLifetimePerformance.parse_obj(response["data"]["octoHeatPumpLifetimePerformance"]) - - return None - - except TimeoutError: - _LOGGER.warning(f'Failed to connect. Timeout of {self._timeout} exceeded.') - raise TimeoutException() - async def async_get_heat_pump_time_ranged_performance(self, euid: str, start_at: datetime, end_at: datetime): """Get heat pump live performance""" await self.async_refresh_token()