File tree Expand file tree Collapse file tree 2 files changed +1
-20
lines changed
roborock/devices/traits/v1 Expand file tree Collapse file tree 2 files changed +1
-20
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1313from 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
3617async def dnd_trait (device : RoborockDevice ) -> DoNotDisturbTrait :
3718 """Create a DoNotDisturbTrait instance with mocked dependencies."""
You can’t perform that action at this time.
0 commit comments