From ac57004348c395bd5c60ead17d98aae8c65841bd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 00:42:08 +0000 Subject: [PATCH] chore(pre-commit.ci): auto fixes --- midealocal/cloud.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/midealocal/cloud.py b/midealocal/cloud.py index 50bcfff4..f9768047 100644 --- a/midealocal/cloud.py +++ b/midealocal/cloud.py @@ -843,24 +843,25 @@ async def list_appliances( class ToshibaIOLife(MideaAirCloud): - """ Toshiba IOLife """ + """Toshiba IOLife""" + async def list_appliance_types( self, ) -> dict[int, dict[str, Any]] | None: - """ List Toshiba IOLife device types """ + """List Toshiba IOLife device types""" data = self._make_general_data() data.update({"applianceType": "0xFF"}) if response := await self._api_request( endpoint="/v1/appliance/type/list/get", data=data, ): - return(data) + return data return None async def list_appliances( self, ) -> dict[int, dict[str, Any]] | None: - """ Get Toshiba IOLife devices.""" + """Get Toshiba IOLife devices.""" data = self._make_general_data() if response := await self._api_request( endpoint="/v2/appliance/user/list/get", @@ -899,7 +900,6 @@ async def list_appliances( return appliances return None - # FIXME: this isn't working: async def download_lua( self, @@ -913,19 +913,20 @@ async def download_lua( data = self._make_general_data() data.update( { - "appId": self._app_id, - "appKey": self._app_key, - "applianceMFCode": manufacturer_code, - "applianceType": hex(device_type), - "modelNumber": "", - "applianceSn": sn, - "version": "0", - }) + "appId": self._app_id, + "appKey": self._app_key, + "applianceMFCode": manufacturer_code, + "applianceType": hex(device_type), + "modelNumber": "", + "applianceSn": sn, + "version": "0", + } + ) if model_number is not None: data["modelNumber"] = model_number fnm = None if response := await self._api_request( - endpoint="/v1/appliance/protocol/lua/luaGet", # FIXME: Wrong URL? + endpoint="/v1/appliance/protocol/lua/luaGet", # FIXME: Wrong URL? data=data, ): res = await self._session.get(response["url"])