@@ -351,9 +351,9 @@ async def discover(ctx):
351351 """Discover devices."""
352352 context : RoborockContext = ctx .obj
353353 # Use the explicit refresh method for the discover command
354- cache_data = await context .refresh_devices ()
354+ connection_cache = await context .refresh_devices ()
355355
356- home_data = cache_data .home_data
356+ home_data = connection_cache . cache_data .home_data
357357 click .echo (f"Discovered devices { ', ' .join ([device .name for device in home_data .get_all_devices ()])} " )
358358
359359
@@ -376,10 +376,10 @@ async def list_devices(ctx):
376376@async_command
377377async def list_scenes (ctx , device_id ):
378378 context : RoborockContext = ctx .obj
379- cache_data = await context .get_devices ()
379+ connection_cache = await context .get_devices ()
380380
381- client = RoborockApiClient (cache_data .email )
382- scenes = await client .get_scenes (cache_data .user_data , device_id )
381+ client = RoborockApiClient (connection_cache .email )
382+ scenes = await client .get_scenes (connection_cache .user_data , device_id )
383383 output_list = []
384384 for scene in scenes :
385385 output_list .append (scene .as_dict ())
@@ -392,10 +392,10 @@ async def list_scenes(ctx, device_id):
392392@async_command
393393async def execute_scene (ctx , scene_id ):
394394 context : RoborockContext = ctx .obj
395- cache_data = await context .get_devices ()
395+ connection_cache = await context .get_devices ()
396396
397- client = RoborockApiClient (cache_data .email )
398- await client .execute_scene (cache_data .user_data , scene_id )
397+ client = RoborockApiClient (connection_cache .email )
398+ await client .execute_scene (connection_cache .user_data , scene_id )
399399
400400
401401async def _v1_trait (context : RoborockContext , device_id : str , display_func : Callable [[], V1TraitMixin ]) -> Trait :
@@ -815,9 +815,9 @@ async def get_device_info(ctx: click.Context):
815815 """
816816 click .echo ("Discovering devices..." )
817817 context : RoborockContext = ctx .obj
818- cache_data = await context .get_devices ()
818+ connection_cache = await context .get_devices ()
819819
820- home_data = cache_data .home_data
820+ home_data = connection_cache . cache_data .home_data
821821
822822 all_devices = home_data .get_all_devices ()
823823 if not all_devices :
@@ -832,7 +832,7 @@ async def get_device_info(ctx: click.Context):
832832 click .echo (f" - Processing { device .name } ({ device .duid } )" )
833833 product_info = home_data .product_map [device .product_id ]
834834 device_data = DeviceData (device , product_info .model )
835- mqtt_client = RoborockMqttClientV1 (cache_data .user_data , device_data )
835+ mqtt_client = RoborockMqttClientV1 (connection_cache .user_data , device_data )
836836
837837 try :
838838 init_status_result = await mqtt_client .send_command (
0 commit comments