Skip to content

Commit d903112

Browse files
committed
fix: correct typo in fan level and add normalization method
1 parent 2a50dc2 commit d903112

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

roborock/data/b01_q10/b01_q10_code_mappings.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,17 @@ class B01_Q10_DP(RoborockModeEnum):
121121
class YXFanLevel(RoborockModeEnum):
122122
UNKNOWN = "unknown", -1
123123
CLOSE = "close", 0
124-
QUITE = "quite", 1
124+
QUIET = "quiet", 1
125125
NORMAL = "normal", 2
126126
STRONG = "strong", 3
127127
MAX = "max", 4
128128
SUPER = "super", 8
129129

130+
@classmethod
131+
def from_value(cls, value: str) -> "YXFanLevel":
132+
normalized = "quiet" if value.lower() == "quite" else value
133+
return super().from_value(normalized)
134+
130135

131136
class YXWaterLevel(RoborockModeEnum):
132137
UNKNOWN = "unknown", -1

0 commit comments

Comments
 (0)