Skip to content

Commit aa2691a

Browse files
authored
feat: add dock strainer and cleaning brush consumable reset attributes (#805)
Add STRAINER_WORK_TIMES and CLEANING_BRUSH_WORK_TIMES to ConsumableAttribute so callers can reset dock-specific consumables via reset_consumable(). The Consumable dataclass already tracks these fields; only the reset side was missing from the enum.
1 parent cef3c27 commit aa2691a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

roborock/devices/traits/v1/consumeable.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class ConsumableAttribute(StrEnum):
2323
FILTER_WORK_TIME = "filter_work_time"
2424
SIDE_BRUSH_WORK_TIME = "side_brush_work_time"
2525
MAIN_BRUSH_WORK_TIME = "main_brush_work_time"
26+
STRAINER_WORK_TIME = "strainer_work_time"
27+
CLEANING_BRUSH_WORK_TIME = "cleaning_brush_work_time"
2628

2729
@classmethod
2830
def from_str(cls, value: str) -> Self:

tests/devices/traits/v1/test_consumable.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ async def test_get_consumable_data_success(consumable_trait: ConsumableTrait, mo
5151
(ConsumableAttribute.SIDE_BRUSH_WORK_TIME, "side_brush_work_time"),
5252
(ConsumableAttribute.FILTER_WORK_TIME, "filter_work_time"),
5353
(ConsumableAttribute.SENSOR_DIRTY_TIME, "sensor_dirty_time"),
54+
(ConsumableAttribute.STRAINER_WORK_TIME, "strainer_work_time"),
55+
(ConsumableAttribute.CLEANING_BRUSH_WORK_TIME, "cleaning_brush_work_time"),
5456
],
5557
)
5658
async def test_reset_consumable_data(

0 commit comments

Comments
 (0)