@@ -148,17 +148,14 @@ def device_creator(device: HomeDataDevice, product: HomeDataProduct) -> Roborock
148148 trait : Trait
149149 match device .pv :
150150 case DeviceVersion .V1 :
151- v1_channel = create_v1_channel (user_data , mqtt_params , mqtt_session , device , cache )
152- channel = v1_channel
153- trait = v1 .create (product , v1_channel .rpc_channel )
151+ channel = create_v1_channel (user_data , mqtt_params , mqtt_session , device , cache )
152+ trait = v1 .create (product , channel .rpc_channel )
154153 case DeviceVersion .A01 :
155- mqtt_channel = create_mqtt_channel (user_data , mqtt_params , mqtt_session , device )
156- channel = mqtt_channel
157- trait = a01 .create (product , mqtt_channel )
154+ channel = create_mqtt_channel (user_data , mqtt_params , mqtt_session , device )
155+ trait = a01 .create (product , channel )
158156 case DeviceVersion .B01 :
159- mqtt_channel = create_mqtt_channel (user_data , mqtt_params , mqtt_session , device )
160- channel = mqtt_channel
161- trait = b01 .create (mqtt_channel )
157+ channel = create_mqtt_channel (user_data , mqtt_params , mqtt_session , device )
158+ trait = b01 .create (channel )
162159 case _:
163160 raise NotImplementedError (f"Device { device .name } has unsupported version { device .pv } " )
164161 return RoborockDevice (device , channel , trait )
0 commit comments