Skip to content

Commit

Permalink
chore(pre-commit.ci): auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Sep 23, 2024
1 parent 9705abf commit ac57004
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions midealocal/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -899,7 +900,6 @@ async def list_appliances(
return appliances
return None


# FIXME: this isn't working:
async def download_lua(
self,
Expand All @@ -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"])
Expand Down

0 comments on commit ac57004

Please sign in to comment.