Skip to content

Commit 90efc95

Browse files
committed
fix: Revert changes to dnd
1 parent c137e1f commit 90efc95

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

roborock/devices/traits/v1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class PropertiesApi(Trait):
5454

5555
# All v1 devices have these traits
5656
status: StatusTrait
57+
dnd: DoNotDisturbTrait
5758
clean_summary: CleanSummaryTrait
5859
sound_volume: SoundVolumeTrait
5960
rooms: RoomsTrait
@@ -64,7 +65,6 @@ class PropertiesApi(Trait):
6465
device_features: DeviceFeaturesTrait
6566

6667
# Optional features that may not be supported on all devices
67-
dnd: DoNotDisturbTrait | None = None
6868
child_lock: ChildLockTrait | None = None
6969
led_status: LedStatusTrait | None = None
7070
flow_led_status: FlowLedStatusTrait | None = None

tests/devices/traits/v1/test_dnd.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,6 @@
1313
from tests import mock_data
1414

1515

16-
@pytest.fixture(autouse=True)
17-
async def supported_features(roborock_cache: Cache, device: RoborockDevice) -> None:
18-
"""Fixture to set up supported features in cache."""
19-
data = await roborock_cache.get()
20-
app_status = AppInitStatus.from_dict(mock_data.APP_GET_INIT_STATUS)
21-
product = HomeDataProduct.from_dict(mock_data.HOME_DATA_RAW["products"][0])
22-
data.device_features = DeviceFeatures.from_feature_flags(
23-
new_feature_info=app_status.new_feature_info,
24-
new_feature_info_str=app_status.new_feature_info_str,
25-
feature_info=app_status.feature_info,
26-
product_nickname=product.product_nickname,
27-
)
28-
await roborock_cache.set(data)
29-
30-
# Ensure device traits are initialized with the updated cache
31-
assert device.v1_properties
32-
await device.v1_properties.discover_features()
33-
34-
3516
@pytest.fixture
3617
async def dnd_trait(device: RoborockDevice) -> DoNotDisturbTrait:
3718
"""Create a DoNotDisturbTrait instance with mocked dependencies."""

0 commit comments

Comments
 (0)