This answer was written prior to the release of 1.13 and "The Flattening""The Flattening" that came with it. An updated answer can be found here.
You're actually pretty close, and definitely on the right track. Instead of {Inventory:[{id:<block ID>,data:<data value>}]}
, use {Inventory:[{id:<block ID>,Damage:<data value>s}]}
. The s
after the data value is important since it's stored as a short, not as an int. (As an aside, if it were stored as a byte, you would append a b
instead.)