roborock.devices.traits.v1.wash_towel_mode

Trait for wash towel mode.

 1"""Trait for wash towel mode."""
 2
 3from roborock.data import WashTowelMode
 4from roborock.device_features import is_wash_n_fill_dock
 5from roborock.devices.traits.v1 import common
 6from roborock.roborock_typing import RoborockCommand
 7
 8
 9class WashTowelModeTrait(WashTowelMode, common.V1TraitMixin):
10    """Trait for wash towel mode."""
11
12    command = RoborockCommand.GET_WASH_TOWEL_MODE
13    requires_dock_type = is_wash_n_fill_dock
10class WashTowelModeTrait(WashTowelMode, common.V1TraitMixin):
11    """Trait for wash towel mode."""
12
13    command = RoborockCommand.GET_WASH_TOWEL_MODE
14    requires_dock_type = is_wash_n_fill_dock

Trait for wash towel mode.

command = <RoborockCommand.GET_WASH_TOWEL_MODE: 'get_wash_towel_mode'>
def requires_dock_type( dock_type: roborock.data.v1.v1_code_mappings.RoborockDockTypeCode) -> bool:
662def is_wash_n_fill_dock(dock_type: RoborockDockTypeCode) -> bool:
663    """Check if the dock type is a wash and fill dock."""
664    return dock_type in WASH_N_FILL_DOCK_TYPES

Check if the dock type is a wash and fill dock.