File tree Expand file tree Collapse file tree 2 files changed +1
-18
lines changed
roborock/devices/traits/v1 Expand file tree Collapse file tree 2 files changed +1
-18
lines changed Original file line number Diff line number Diff line change 1818V1ResponseData = dict | list | int | str
1919
2020
21- class V1TraitDataConverter (ABC ):
22- """Converts responses to RoborockBase objects.
23-
24- This is an internal class and should not be used directly by consumers.
25- """
26-
27- @abstractmethod
28- def convert (self , response : V1ResponseData ) -> RoborockBase :
29- """Convert the values to a dict that can be parsed as a RoborockBase."""
30-
31- def __repr__ (self ) -> str :
32- return self .__class__ .__name__
33-
34-
3521class V1TraitDataConverter (ABC ):
3622 """Converts responses to RoborockBase objects.
3723
Original file line number Diff line number Diff line change @@ -48,10 +48,7 @@ def convert(self, response: common.V1ResponseData) -> Rooms:
4848 raise ValueError (f"Unexpected RoomsTrait response format: { response !r} " )
4949 segment_map = self .extract_segment_map (response )
5050 return Rooms (
51- rooms = [
52- NamedRoomMapping (segment_id = segment_id , iot_id = iot_id )
53- for segment_id , iot_id in segment_map .items ()
54- ]
51+ rooms = [NamedRoomMapping (segment_id = segment_id , iot_id = iot_id ) for segment_id , iot_id in segment_map .items ()]
5552 )
5653
5754 @staticmethod
You can’t perform that action at this time.
0 commit comments