4242from roborock .map .map_parser import MapParserConfig
4343
4444from .child_lock import ChildLockTrait
45- from .clean_record import CleanRecordTrait
4645from .clean_summary import CleanSummaryTrait
4746from .command import CommandTrait
4847from .common import V1TraitMixin
5554from .led_status import LedStatusTrait
5655from .map_content import MapContentTrait
5756from .maps import MapsTrait
57+ from .network_info import NetworkInfoTrait
5858from .rooms import RoomsTrait
5959from .smart_wash_params import SmartWashParamsTrait
6060from .status import StatusTrait
7070 "StatusTrait" ,
7171 "DoNotDisturbTrait" ,
7272 "CleanSummaryTrait" ,
73- "CleanRecordTrait" ,
7473 "SoundVolumeTrait" ,
7574 "MapsTrait" ,
7675 "MapContentTrait" ,
8584 "DustCollectionModeTrait" ,
8685 "WashTowelModeTrait" ,
8786 "SmartWashParamsTrait" ,
87+ "NetworkInfoTrait" ,
8888]
8989
9090
@@ -100,14 +100,14 @@ class PropertiesApi(Trait):
100100 command : CommandTrait
101101 dnd : DoNotDisturbTrait
102102 clean_summary : CleanSummaryTrait
103- clean_record : CleanRecordTrait
104103 sound_volume : SoundVolumeTrait
105104 rooms : RoomsTrait
106105 maps : MapsTrait
107106 map_content : MapContentTrait
108107 consumables : ConsumableTrait
109108 home : HomeTrait
110109 device_features : DeviceFeaturesTrait
110+ network_info : NetworkInfoTrait
111111
112112 # Optional features that may not be supported on all devices
113113 child_lock : ChildLockTrait | None = None
@@ -120,6 +120,7 @@ class PropertiesApi(Trait):
120120
121121 def __init__ (
122122 self ,
123+ device_uid : str ,
123124 product : HomeDataProduct ,
124125 home_data : HomeData ,
125126 rpc_channel : V1RpcChannel ,
@@ -129,20 +130,20 @@ def __init__(
129130 map_parser_config : MapParserConfig | None = None ,
130131 ) -> None :
131132 """Initialize the V1TraitProps."""
133+ self ._device_uid = device_uid
132134 self ._rpc_channel = rpc_channel
133135 self ._mqtt_rpc_channel = mqtt_rpc_channel
134136 self ._map_rpc_channel = map_rpc_channel
135137 self ._cache = cache
136138
137139 self .status = StatusTrait (product )
138- self .clean_summary = CleanSummaryTrait ()
139- self .clean_record = CleanRecordTrait (self .clean_summary )
140140 self .consumables = ConsumableTrait ()
141141 self .rooms = RoomsTrait (home_data )
142142 self .maps = MapsTrait (self .status )
143143 self .map_content = MapContentTrait (map_parser_config )
144144 self .home = HomeTrait (self .status , self .maps , self .rooms , cache )
145145 self .device_features = DeviceFeaturesTrait (product .product_nickname , cache )
146+ self .network_info = NetworkInfoTrait (device_uid , cache )
146147
147148 # Dynamically create any traits that need to be populated
148149 for item in fields (self ):
@@ -248,6 +249,7 @@ async def _set_cached_trait_data(self, name: str, value: Any) -> None:
248249
249250
250251def create (
252+ device_uid : str ,
251253 product : HomeDataProduct ,
252254 home_data : HomeData ,
253255 rpc_channel : V1RpcChannel ,
@@ -257,4 +259,13 @@ def create(
257259 map_parser_config : MapParserConfig | None = None ,
258260) -> PropertiesApi :
259261 """Create traits for V1 devices."""
260- return PropertiesApi (product , home_data , rpc_channel , mqtt_rpc_channel , map_rpc_channel , cache , map_parser_config )
262+ return PropertiesApi (
263+ device_uid ,
264+ product ,
265+ home_data ,
266+ rpc_channel ,
267+ mqtt_rpc_channel ,
268+ map_rpc_channel ,
269+ cache ,
270+ map_parser_config ,
271+ )
0 commit comments