Skip to content

Commit 38076f7

Browse files
committed
chore: simplify device_feature_trait usage
1 parent b4fcdca commit 38076f7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

roborock/devices/traits/v1/wash_towel_mode.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class WashTowelModeTrait(WashTowelMode, common.V1TraitMixin):
1717

1818
def __init__(
1919
self,
20-
device_feature_trait: DeviceFeaturesTrait | None = None,
20+
device_feature_trait: DeviceFeaturesTrait,
2121
wash_mode: WashTowelModes | None = None,
2222
) -> None:
2323
super().__init__()
@@ -26,8 +26,6 @@ def __init__(
2626

2727
@cached_property
2828
def wash_towel_mode_options(self) -> list[WashTowelModes]:
29-
if self.device_feature_trait is None:
30-
return []
3129
return get_wash_towel_modes(self.device_feature_trait)
3230

3331
async def set_wash_towel_mode(self, mode: WashTowelModes) -> None:

0 commit comments

Comments
 (0)