Skip to content

Commit 75890d0

Browse files
author
NOisi-X
committed
fix: resolve pre-commit hook failures
1 parent 841426c commit 75890d0

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

roborock/data/zeo/zeo_code_mappings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class ZeoMode(RoborockEnum):
6060

6161

6262
class ZeoState(RoborockEnum):
63-
standby = 1 # Standy
63+
standby = 1
6464
weighing = 2 # Checking
6565
soaking = 3
6666
washing = 4

roborock/devices/traits/a01/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,9 @@ async def _build_feature_gated_dps(
630630
{RoborockZeoProtocol.ID_QUERY: to_query},
631631
value_encoder=json.dumps,
632632
)
633-
for dp_id, raw_val in current.items():
633+
for fetched_dp, raw_val in current.items():
634634
if raw_val is not None:
635-
self._dps_cache[dp_id] = raw_val
635+
self._dps_cache[fetched_dp] = raw_val
636636
for dp, attr in self._FEATURE_GATED_DPS:
637637
if not getattr(features, attr, False):
638638
continue
@@ -1004,7 +1004,7 @@ async def get_auto_detergent(self) -> bool:
10041004
RoborockZeoProtocol.DETERGENT_TYPE if self.is_addition_type_control
10051005
else RoborockZeoProtocol.DETERGENT_SET
10061006
)
1007-
return parse_bool(raw) if not self.is_addition_type_control else (raw and int(raw) > 0)
1007+
return parse_bool(raw) if not self.is_addition_type_control else bool(raw and int(raw) > 0)
10081008

10091009
async def get_auto_softener(self) -> bool:
10101010
"""Return whether automatic softener dispensing is enabled."""
@@ -1022,7 +1022,7 @@ async def get_auto_softener(self) -> bool:
10221022
RoborockZeoProtocol.SOFTENER_TYPE if self.is_addition_type_control
10231023
else RoborockZeoProtocol.SOFTENER_SET
10241024
)
1025-
return parse_bool(raw) if not self.is_addition_type_control else (raw and int(raw) > 0)
1025+
return parse_bool(raw) if not self.is_addition_type_control else bool(raw and int(raw) > 0)
10261026

10271027
# ── Feature-gated DP preloading ─────────────────────────────────
10281028
# Exposes the canonical "forceLoad" + "loadFeatureDps" two-phase

0 commit comments

Comments
 (0)