@@ -36,9 +36,11 @@ async def query_values(self, props: list[RoborockB01Props]) -> B01Props | None:
3636 command = RoborockB01Q7Methods .GET_PROP ,
3737 params = {"property" : props },
3838 )
39+ if not isinstance (result , dict ):
40+ raise TypeError (f"Unexpected response type for GET_PROP: { type (result ).__name__ } : { result !r} " )
3941 return B01Props .from_dict (result )
4042
41- async def set_prop (self , prop : RoborockB01Props , value : Any ) -> dict [ str , Any ] :
43+ async def set_prop (self , prop : RoborockB01Props , value : Any ) -> Any :
4244 """Set a property on the device."""
4345 return await send_decoded_command (
4446 self ._channel ,
@@ -47,15 +49,15 @@ async def set_prop(self, prop: RoborockB01Props, value: Any) -> dict[str, Any]:
4749 params = {prop : value },
4850 )
4951
50- async def set_fan_speed (self , fan_speed : SCWindMapping ) -> dict [ str , Any ] :
52+ async def set_fan_speed (self , fan_speed : SCWindMapping ) -> Any :
5153 """Set the fan speed (wind)."""
5254 return await self .set_prop (RoborockB01Props .WIND , fan_speed .code )
5355
54- async def set_water_level (self , water_level : WaterLevelMapping ) -> dict [ str , Any ] :
56+ async def set_water_level (self , water_level : WaterLevelMapping ) -> Any :
5557 """Set the water level (water)."""
5658 return await self .set_prop (RoborockB01Props .WATER , water_level .code )
5759
58- async def start_clean (self ) -> dict [ str , Any ] :
60+ async def start_clean (self ) -> Any :
5961 """Start cleaning."""
6062 return await send_decoded_command (
6163 self ._channel ,
@@ -68,7 +70,7 @@ async def start_clean(self) -> dict[str, Any]:
6870 },
6971 )
7072
71- async def pause_clean (self ) -> dict [ str , Any ] :
73+ async def pause_clean (self ) -> Any :
7274 """Pause cleaning."""
7375 return await send_decoded_command (
7476 self ._channel ,
@@ -81,7 +83,7 @@ async def pause_clean(self) -> dict[str, Any]:
8183 },
8284 )
8385
84- async def stop_clean (self ) -> dict [ str , Any ] :
86+ async def stop_clean (self ) -> Any :
8587 """Stop cleaning."""
8688 return await send_decoded_command (
8789 self ._channel ,
@@ -94,7 +96,7 @@ async def stop_clean(self) -> dict[str, Any]:
9496 },
9597 )
9698
97- async def return_to_dock (self ) -> dict [ str , Any ] :
99+ async def return_to_dock (self ) -> Any :
98100 """Return to dock."""
99101 return await send_decoded_command (
100102 self ._channel ,
@@ -103,7 +105,7 @@ async def return_to_dock(self) -> dict[str, Any]:
103105 params = {},
104106 )
105107
106- async def find_me (self ) -> dict [ str , Any ] :
108+ async def find_me (self ) -> Any :
107109 """Locate the robot."""
108110 return await send_decoded_command (
109111 self ._channel ,
0 commit comments