4141from pyshark .capture .live_capture import LiveCapture , UnknownInterfaceException # type: ignore
4242from pyshark .packet .packet import Packet # type: ignore
4343
44- from roborock import SHORT_MODEL_TO_ENUM , RoborockCommand
45- from roborock .data import DeviceData , RoborockBase , UserData
44+ from roborock import RoborockCommand
45+ from roborock .data import RoborockBase , UserData
4646from roborock .device_features import DeviceFeatures
4747from roborock .devices .cache import Cache , CacheData
4848from roborock .devices .device import RoborockDevice
@@ -821,10 +821,6 @@ async def get_device_info(ctx: click.Context):
821821 """
822822 click .echo ("Discovering devices..." )
823823 context : RoborockContext = ctx .obj
824- connection_cache = await context .get_devices ()
825-
826- home_data = connection_cache .cache_data .home_data
827-
828824 device_connection_manager = await context .get_device_manager ()
829825 device_manager = await device_connection_manager .ensure_device_manager ()
830826 devices = await device_manager .get_devices ()
@@ -849,17 +845,21 @@ async def get_device_info(ctx: click.Context):
849845 }
850846 if device .v1_properties is not None :
851847 try :
852- result : list [dict [str , Any ]] = await device .v1_properties .command .send (RoborockCommand .APP_GET_INIT_STATUS )
848+ result : list [dict [str , Any ]] = await device .v1_properties .command .send (
849+ RoborockCommand .APP_GET_INIT_STATUS
850+ )
853851 except Exception as e :
854852 click .echo (f" - Error processing device { device .name } : { e } " , err = True )
855853 continue
856854 init_status_result = result [0 ] if result else {}
857- current_product_data .update ({
858- "New Feature Info" : init_status_result .get ("new_feature_info" ),
859- "New Feature Info Str" : init_status_result .get ("new_feature_info_str" ),
860- "Feature Info" : init_status_result .get ("feature_info" ),
861- })
862-
855+ current_product_data .update (
856+ {
857+ "New Feature Info" : init_status_result .get ("new_feature_info" ),
858+ "New Feature Info Str" : init_status_result .get ("new_feature_info_str" ),
859+ "Feature Info" : init_status_result .get ("feature_info" ),
860+ }
861+ )
862+
863863 all_products_data [device .product .model ] = current_product_data
864864
865865 if all_products_data :
0 commit comments