@@ -93,6 +93,7 @@ def __init__(
9393 custom_handlers : dict [str , Callable [[list [Any ]], Any ]] | None = None ,
9494 device_info : HomeDataDevice | None = None ,
9595 product : HomeDataProduct | None = None ,
96+ dss : int = 169 ,
9697 ):
9798 super ().__init__ (duid = duid , device_info = device_info , product = product )
9899 self .battery = battery
@@ -102,6 +103,7 @@ def __init__(
102103 self .mop_mode = mop_mode
103104 self .water_box_mode = water_box_mode
104105 self .custom_handlers = custom_handlers or {}
106+ self .dss = dss
105107
106108 self .consumables = {
107109 "main_brush_work_time" : 74382 ,
@@ -181,6 +183,21 @@ def v1_channel(self) -> V1Channel:
181183 """Returns the real V1Channel bound to the fake channels."""
182184 return self ._v1_channel
183185
186+ @property
187+ def in_cleaning (self ) -> int :
188+ """Return 1 if cleaning, else 0."""
189+ return 1 if self .state == RoborockStateCode .cleaning else 0
190+
191+ @property
192+ def in_returning (self ) -> int :
193+ """Return 1 if returning, else 0."""
194+ return 1 if self .state == RoborockStateCode .returning_home else 0
195+
196+ @property
197+ def charge_status (self ) -> int :
198+ """Return 1 if charging, else 0."""
199+ return 1 if self .state == RoborockStateCode .charging else 0
200+
184201 def get_status_dict (self ) -> dict [str , Any ]:
185202 """Generate status dict using the current simulated state."""
186203 return {
@@ -192,8 +209,8 @@ def get_status_dict(self) -> dict[str, Any]:
192209 "clean_area" : 20965000 ,
193210 "error_code" : 0 ,
194211 "map_present" : 1 ,
195- "in_cleaning" : 1 if self .state == RoborockStateCode . cleaning else 0 ,
196- "in_returning" : 1 if self .state == RoborockStateCode . returning_home else 0 ,
212+ "in_cleaning" : self .in_cleaning ,
213+ "in_returning" : self .in_returning ,
197214 "in_fresh_state" : 1 ,
198215 "lab_status" : 1 ,
199216 "water_box_status" : 1 ,
@@ -225,10 +242,10 @@ def get_status_dict(self) -> dict[str, Any]:
225242 "collision_avoid_status" : 1 ,
226243 "switch_map_mode" : 0 ,
227244 "dock_error_status" : 0 ,
228- "charge_status" : 1 if self .state == RoborockStateCode . charging else 0 ,
245+ "charge_status" : self .charge_status ,
229246 "unsave_map_reason" : 0 ,
230247 "unsave_map_flag" : 0 ,
231- "dss" : 169 , # Dock sensor status (bitmask representing water box, dust bag, wash/dry status)
248+ "dss" : self . dss ,
232249 }
233250
234251 def _handle_app_start (self , params : Any ) -> str :
0 commit comments