add unit attribute in device type obj