Added casts for Motor and Custom sensor data assignments