From f3dd0e92482cb433b12bc3b14dd9c4424e22bdcb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 06:12:43 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- custom_components/audiconnect/audi_services.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/custom_components/audiconnect/audi_services.py b/custom_components/audiconnect/audi_services.py index 6a78bcb9..e32766da 100644 --- a/custom_components/audiconnect/audi_services.py +++ b/custom_components/audiconnect/audi_services.py @@ -548,7 +548,9 @@ async def set_battery_charger(self, vin: str, start: bool, timer: bool): async def set_climatisation(self, vin: str, start: bool): if start: data = '{ "targetTemperature": 23, "targetTemperatureUnit": "celsius", "climatisationWithoutExternalPower": true, "climatizationAtUnlock": false, "windowHeatingEnabled": true, "zoneFrontLeftEnabled": false, "zoneFrontRightEnabled": false, "zoneRearLeftEnabled": false, "zoneRearRightEnabled": false }' - headers = { "Authorization": "Bearer " + self._bearer_token_json["access_token"] } + headers = { + "Authorization": "Bearer " + self._bearer_token_json["access_token"] + } res = await self._api.request( "POST", "https://emea.bff.cariad.digital/vehicle/v1/vehicles/{vin}/climatisation/start".format( @@ -556,10 +558,12 @@ async def set_climatisation(self, vin: str, start: bool): ), headers=headers, data=data, - ) + ) else: - data = '' - headers = { "Authorization": "Bearer " + self._bearer_token_json["access_token"] } + data = "" + headers = { + "Authorization": "Bearer " + self._bearer_token_json["access_token"] + } res = await self._api.request( "POST", "https://emea.bff.cariad.digital/vehicle/v1/vehicles/{vin}/climatisation/stop".format(