Skip to content

Commit eda1e98

Browse files
authored
fix: bad dock summary logic (#345)
1 parent bb438de commit eda1e98

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

roborock/roborock_typing.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,11 @@ class DeviceProp(RoborockBase):
464464
dust_collection_mode_name: str | None = None
465465

466466
def __post_init__(self) -> None:
467-
if self.dock_summary and self.dock_summary.dust_collection_mode and self.dock_summary.dust_collection_mode.mode:
467+
if (
468+
self.dock_summary
469+
and self.dock_summary.dust_collection_mode is not None
470+
and self.dock_summary.dust_collection_mode.mode is not None
471+
):
468472
self.dust_collection_mode_name = self.dock_summary.dust_collection_mode.mode.name
469473

470474
def update(self, device_prop: DeviceProp) -> None:

0 commit comments

Comments
 (0)