File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 66import json
77import logging
88from collections .abc import Callable
9- from typing import Any , TypeVar
9+ from typing import TypeAlias , TypeVar
1010
1111from roborock .devices .transport .mqtt_channel import MqttChannel
1212from roborock .exceptions import RoborockException
1616_LOGGER = logging .getLogger (__name__ )
1717_TIMEOUT = 10.0
1818_T = TypeVar ("_T" )
19+ DecodedB01Response : TypeAlias = dict [str , object ] | str
1920
2021
2122def _matches_map_response (response_message : RoborockMessage , * , version : bytes | None ) -> bytes | None :
@@ -61,11 +62,11 @@ def on_message(response_message: RoborockMessage) -> None:
6162async def send_decoded_command (
6263 mqtt_channel : MqttChannel ,
6364 request_message : Q7RequestMessage ,
64- ) -> Any :
65+ ) -> DecodedB01Response :
6566 """Send a command on the MQTT channel and get a decoded response."""
6667 _LOGGER .debug ("Sending B01 MQTT command: %s" , request_message )
6768
68- def find_response (response_message : RoborockMessage ) -> Any | None :
69+ def find_response (response_message : RoborockMessage ) -> DecodedB01Response | None :
6970 """Handle incoming messages and resolve the future."""
7071 try :
7172 decoded_dps = decode_rpc_response (response_message )
You can’t perform that action at this time.
0 commit comments