@@ -235,7 +235,7 @@ async def status(ctx, device_id):
235235 devices = home_data .devices + home_data .received_devices
236236 device = next (device for device in devices if device .duid == device_id )
237237 product_info : dict [str , HomeDataProduct ] = {product .id : product for product in home_data .products }
238- device_data = DeviceData (device , product_info [device .product_id ].model , region = cache_data . user_data . region )
238+ device_data = DeviceData (device , product_info [device .product_id ].model )
239239
240240 mqtt_client = RoborockMqttClientV1 (cache_data .user_data , device_data )
241241 if not (networking := cache_data .network_info .get (device .duid )):
@@ -245,9 +245,7 @@ async def status(ctx, device_id):
245245 else :
246246 _LOGGER .debug ("Using cached networking info for device %s: %s" , device .duid , networking )
247247
248- local_device_data = DeviceData (
249- device , product_info [device .product_id ].model , networking .ip , region = cache_data .user_data .region
250- )
248+ local_device_data = DeviceData (device , product_info [device .product_id ].model , networking .ip )
251249 local_client = RoborockLocalClientV1 (local_device_data )
252250 status = await local_client .get_status ()
253251 click .echo (json .dumps (status .as_dict (), indent = 4 ))
@@ -272,7 +270,7 @@ async def command(ctx, cmd, device_id, params):
272270 )
273271 if model is None :
274272 raise RoborockException (f"Could not find model for device { device .name } " )
275- device_info = DeviceData (device = device , model = model , region = cache_data . user_data . region )
273+ device_info = DeviceData (device = device , model = model )
276274 mqtt_client = RoborockMqttClientV1 (cache_data .user_data , device_info )
277275 await mqtt_client .send_command (cmd , json .loads (params ) if params is not None else None )
278276 await mqtt_client .async_release ()
0 commit comments