Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for qrevo curv #253

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions roborock/code_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,13 @@ class RoborockFanSpeedQRevoMaster(RoborockFanPowerCode):
max_plus = 105
custom = 110 # Smartplan

class RoborockFanSpeedQRevoCurv(RoborockFanPowerCode):
quiet = 101
balanced = 102
turbo = 103
max = 104
max_plus = 105
smart_mode = 110

Lash-L marked this conversation as resolved.
Show resolved Hide resolved
class RoborockFanSpeedP10(RoborockFanPowerCode):
off = 105
Expand All @@ -276,6 +283,12 @@ class RoborockFanSpeedS8MaxVUltra(RoborockFanPowerCode):
class RoborockMopModeCode(RoborockEnum):
"""Describes the mop mode of the vacuum cleaner."""

class RoborockMopModeQRevoCurv(RoborockMopModeCode):
standard = 300
deep = 301
deep_plus = 303
fast = 304
smart_mode = 306
Lash-L marked this conversation as resolved.
Show resolved Hide resolved

class RoborockMopModeS7(RoborockMopModeCode):
"""Describes the mop mode of the vacuum cleaner."""
Christopher-Masselli marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -338,6 +351,13 @@ class RoborockMopIntensityQRevoMaster(RoborockMopIntensityCode):
custom_water_flow = 207
custom = 209 # SmartPlan

class RoborockMopIntensityQRevoCurv(RoborockMopIntensityCode):
off = 200
low = 201
medium = 202
high = 203
custom_water_flow = 207
smart_mode = 209
Lash-L marked this conversation as resolved.
Show resolved Hide resolved

class RoborockMopIntensityP10(RoborockMopIntensityCode):
"""Describes the mop intensity of the vacuum cleaner."""
Expand Down Expand Up @@ -418,6 +438,7 @@ class RoborockDockTypeCode(RoborockEnum):
p10_pro_dock = 9
s8_maxv_ultra_dock = 10
qrevo_s_dock = 15
qrevo_curv_dock = 17


class RoborockDockDustCollectionModeCode(RoborockEnum):
Expand Down
1 change: 1 addition & 0 deletions roborock/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
ROBOROCK_Q7_MAX = "roborock.vacuum.a38"
ROBOROCK_Q7PLUS = "roborock.vacuum.a40"
ROBOROCK_QREVO_MASTER = "roborock.vacuum.a117"
ROBOROCK_QREVO_CURV = "roborock.vacuum.a135"
ROBOROCK_Q8_MAX = "roborock.vacuum.a73"
ROBOROCK_G10S_PRO = "roborock.vacuum.a26"
ROBOROCK_G10S = "roborock.vacuum.a46"
Expand Down
10 changes: 10 additions & 0 deletions roborock/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
RoborockFanSpeedP10,
RoborockFanSpeedQ7Max,
RoborockFanSpeedQRevoMaster,
RoborockFanSpeedQRevoCurv,
Lash-L marked this conversation as resolved.
Show resolved Hide resolved
RoborockFanSpeedS6Pure,
RoborockFanSpeedS7,
RoborockFanSpeedS7MaxV,
Expand All @@ -31,11 +32,13 @@
RoborockMopIntensityP10,
RoborockMopIntensityQ7Max,
RoborockMopIntensityQRevoMaster,
RoborockMopIntensityQRevoCurv,
Lash-L marked this conversation as resolved.
Show resolved Hide resolved
RoborockMopIntensityS5Max,
RoborockMopIntensityS6MaxV,
RoborockMopIntensityS7,
RoborockMopIntensityS8MaxVUltra,
RoborockMopModeCode,
RoborockMopModeQRevoCurv,
RoborockMopModeS7,
RoborockMopModeS8MaxVUltra,
RoborockMopModeS8ProUltra,
Expand All @@ -52,6 +55,7 @@
ROBOROCK_P10,
ROBOROCK_Q7_MAX,
ROBOROCK_QREVO_MASTER,
ROBOROCK_QREVO_CURV,
Lash-L marked this conversation as resolved.
Show resolved Hide resolved
ROBOROCK_QREVO_MAXV,
ROBOROCK_QREVO_PRO,
ROBOROCK_QREVO_S,
Expand Down Expand Up @@ -578,6 +582,11 @@ class QRevoMasterStatus(Status):
fan_power: RoborockFanSpeedQRevoMaster | None = None
water_box_mode: RoborockMopIntensityQRevoMaster | None = None

@dataclass
class QRevoCurvStatus(Status):
fan_power: RoborockFanSpeedQRevoCurv | None = None
water_box_mode: RoborockMopIntensityQRevoCurv | None = None
mop_mode: RoborockMopModeQRevoCurv | None = None
Lash-L marked this conversation as resolved.
Show resolved Hide resolved

@dataclass
class S6MaxVStatus(Status):
Expand Down Expand Up @@ -637,6 +646,7 @@ class S8MaxvUltraStatus(Status):
ROBOROCK_S5_MAX: S5MaxStatus,
ROBOROCK_Q7_MAX: Q7MaxStatus,
ROBOROCK_QREVO_MASTER: QRevoMasterStatus,
ROBOROCK_QREVO_CURV: QRevoCurvStatus,
ROBOROCK_S6: S6PureStatus,
ROBOROCK_S6_MAXV: S6MaxVStatus,
ROBOROCK_S6_PURE: S6PureStatus,
Expand Down
1 change: 1 addition & 0 deletions roborock/version_1_apis/roborock_client_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
RoborockDockTypeCode.p10_pro_dock,
RoborockDockTypeCode.s8_maxv_ultra_dock,
RoborockDockTypeCode.qrevo_s_dock,
RoborockDockTypeCode.qrevo_curv_dock,
]
RT = TypeVar("RT", bound=RoborockBase)
EVICT_TIME = 60
Expand Down
Loading