@@ -843,24 +843,25 @@ async def list_appliances(
843
843
844
844
845
845
class ToshibaIOLife (MideaAirCloud ):
846
- """ Toshiba IOLife """
846
+ """Toshiba IOLife"""
847
+
847
848
async def list_appliance_types (
848
849
self ,
849
850
) -> dict [int , dict [str , Any ]] | None :
850
- """ List Toshiba IOLife device types """
851
+ """List Toshiba IOLife device types"""
851
852
data = self ._make_general_data ()
852
853
data .update ({"applianceType" : "0xFF" })
853
854
if response := await self ._api_request (
854
855
endpoint = "/v1/appliance/type/list/get" ,
855
856
data = data ,
856
857
):
857
- return ( data )
858
+ return data
858
859
return None
859
860
860
861
async def list_appliances (
861
862
self ,
862
863
) -> dict [int , dict [str , Any ]] | None :
863
- """ Get Toshiba IOLife devices."""
864
+ """Get Toshiba IOLife devices."""
864
865
data = self ._make_general_data ()
865
866
if response := await self ._api_request (
866
867
endpoint = "/v2/appliance/user/list/get" ,
@@ -899,7 +900,6 @@ async def list_appliances(
899
900
return appliances
900
901
return None
901
902
902
-
903
903
# FIXME: this isn't working:
904
904
async def download_lua (
905
905
self ,
@@ -913,19 +913,20 @@ async def download_lua(
913
913
data = self ._make_general_data ()
914
914
data .update (
915
915
{
916
- "appId" : self ._app_id ,
917
- "appKey" : self ._app_key ,
918
- "applianceMFCode" : manufacturer_code ,
919
- "applianceType" : hex (device_type ),
920
- "modelNumber" : "" ,
921
- "applianceSn" : sn ,
922
- "version" : "0" ,
923
- })
916
+ "appId" : self ._app_id ,
917
+ "appKey" : self ._app_key ,
918
+ "applianceMFCode" : manufacturer_code ,
919
+ "applianceType" : hex (device_type ),
920
+ "modelNumber" : "" ,
921
+ "applianceSn" : sn ,
922
+ "version" : "0" ,
923
+ }
924
+ )
924
925
if model_number is not None :
925
926
data ["modelNumber" ] = model_number
926
927
fnm = None
927
928
if response := await self ._api_request (
928
- endpoint = "/v1/appliance/protocol/lua/luaGet" , # FIXME: Wrong URL?
929
+ endpoint = "/v1/appliance/protocol/lua/luaGet" , # FIXME: Wrong URL?
929
930
data = data ,
930
931
):
931
932
res = await self ._session .get (response ["url" ])
0 commit comments