Skip to content

Commit 1d2d061

Browse files
committed
chore: further readability improvements to device logging
1 parent a7ce19f commit 1d2d061

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

roborock/data/containers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def product_nickname(self) -> RoborockProductNickname:
230230

231231
def summary_info(self) -> str:
232232
"""Return a string with key product information for logging purposes."""
233-
return f"HomeDataProduct(name={self.name}, model={self.model}, category={self.category})"
233+
return f"{self.name} (model={self.model}, category={self.category})"
234234

235235

236236
@dataclass
@@ -270,8 +270,7 @@ class HomeDataDevice(RoborockBase):
270270
def summary_info(self) -> str:
271271
"""Return a string with key device information for logging purposes."""
272272
return (
273-
f"HomeDataDevice(name={self.name}, model={self.product_id}, "
274-
f"fv={self.fv}, pv={self.pv}, online={self.online})"
273+
f"{self.name} (pv={self.pv}, fv={self.fv}, online={self.online})"
275274
)
276275

277276

roborock/devices/device_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async def discover_devices(self) -> list[RoborockDevice]:
8484
new_devices = {}
8585
start_tasks = []
8686
for duid, (device, product) in device_products.items():
87-
_LOGGER.debug("[%s] Discovered device (%s, %s)", duid, product.summary_info(), device.summary_info())
87+
_LOGGER.debug("[%s] Discovered device %s %s", duid, product.summary_info(), device.summary_info())
8888
if duid in self._devices:
8989
continue
9090
new_device = self._device_creator(home_data, device, product)

0 commit comments

Comments
 (0)