Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 12, 2024
1 parent f0f7ecc commit f3dd0e9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions custom_components/audiconnect/audi_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,18 +548,22 @@ 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(
vin=vin.upper(),
),
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(
Expand Down

0 comments on commit f3dd0e9

Please sign in to comment.