We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c91999 commit 5a377deCopy full SHA for 5a377de
1 file changed
roborock/devices/traits/v1/map_content.py
@@ -12,6 +12,8 @@
12
13
_LOGGER = logging.getLogger(__name__)
14
15
+_TRUNCATE_LENGTH = 20
16
+
17
18
@dataclass
19
class MapContent(RoborockBase):
@@ -23,6 +25,13 @@ class MapContent(RoborockBase):
23
25
map_data: MapData | None = None
24
26
"""The parsed map data which contains metadata for points on the map."""
27
28
+ def __repr__(self) -> str:
29
+ """Return a string representation of the MapContent."""
30
+ img = self.image_content
31
+ if self.image_content and len(self.image_content) > _TRUNCATE_LENGTH:
32
+ img = self.image_content[: _TRUNCATE_LENGTH - 3] + b"..."
33
+ return f"MapContent(image_content={img!r}, map_data={self.map_data!r})"
34
35
36
@common.map_rpc_channel
37
class MapContentTrait(MapContent, common.V1TraitMixin):
0 commit comments