@@ -34,10 +34,12 @@ async def refresh(self):
3434 get_feeding_plan_today = await self .api .device_feeding_plan_today_new (self .serial )
3535 feeding_plan_list = (await self .api .device_feeding_plan_list (self .serial )
3636 if self ._data .get ("enableFeedingPlan" ) else [])
37+ data_real_info = await self .api .device_data_real_info (self .serial )
3738 # Update internal data with fetched API data
3839 self .update_data ({
3940 "grainStatus" : grain_status or {},
4041 "realInfo" : real_info or {},
42+ "dataRealInfo" : data_real_info or {},
4143 "getUpgrade" : get_upgrade or {},
4244 "getAttributeSetting" : attribute_settings or {},
4345 "getDefaultMatrix" : get_default_matrix or {},
@@ -128,6 +130,13 @@ def online(self) -> bool:
128130 def running_state (self ) -> bool :
129131 return self ._data .get ("realInfo" , {}).get ("runningState" , "IDLE" ) == "RUNNING"
130132
133+ @property
134+ def rotor_stuck (self ) -> bool | None :
135+ exception = self ._data .get ("dataRealInfo" , {}).get ("exceptionMessage" )
136+ if exception is None :
137+ return None
138+ return "rotor" in exception .lower () or "stuck" in exception .lower ()
139+
131140 @property
132141 def whether_in_sleep_mode (self ) -> bool :
133142 return bool (self ._data .get ("getAttributeSetting" , {}).get ("enableSleepMode" , False ))
0 commit comments