11from __future__ import annotations
22
3+ import typing
34from dataclasses import dataclass
45from enum import Enum
56
@@ -183,7 +184,7 @@ class CommandInfo:
183184 RoborockCommand .TEST_SOUND_VOLUME : CommandInfo (prefix = b'\x00 \x00 \x00 w' ),
184185 RoborockCommand .UPD_SERVER_TIMER : CommandInfo (prefix = b'\x00 \x00 \x00 w' ),
185186 RoborockCommand .SET_APP_TIMEZONE : CommandInfo (prefix = b'\x00 \x00 \x97 ' ),
186- #TODO discover prefix for following commands
187+ # TODO discover prefix for following commands
187188 # RoborockCommand.APP_GET_DRYER_SETTING: CommandInfo(prefix=b'\x00\x00\x00w'),
188189 # RoborockCommand.APP_SET_DRYER_SETTING: CommandInfo(prefix=b'\x00\x00\x00w'),
189190 # RoborockCommand.GET_DUST_COLLECTION_MODE: CommandInfo(prefix=b'\x00\x00\x00w'),
@@ -207,15 +208,14 @@ def __init__(self, dust_collection_mode: DustCollectionMode,
207208 self .smart_wash_params = smart_wash_params
208209
209210
211+ @dataclass
210212class RoborockDeviceProp :
211- def __init__ (self , status : Status , dnd_timer : DNDTimer , clean_summary : CleanSummary , consumable : Consumable ,
212- last_clean_record : CleanRecord = None , dock_summary : RoborockDockSummary = None ):
213- self .status = status
214- self .dnd_timer = dnd_timer
215- self .clean_summary = clean_summary
216- self .consumable = consumable
217- self .last_clean_record = last_clean_record
218- self .dock_summary = dock_summary
213+ status : typing .Optional [Status ] = None
214+ dnd_timer : typing .Optional [DNDTimer ] = None
215+ clean_summary : typing .Optional [CleanSummary ] = None
216+ consumable : typing .Optional [Consumable ] = None
217+ last_clean_record : typing .Optional [CleanRecord ] = None
218+ dock_summary : typing .Optional [RoborockDockSummary ] = None
219219
220220 def update (self , device_prop : 'RoborockDeviceProp' ):
221221 if device_prop .status :
0 commit comments