The sensor I know of should be swappable electrically so no real risk here. Go for it. I can't write if the connections are the same but the sensor itself is pretty much the same all over.
I'm trying to swap the keyboard and case top from an early 2008 mbp 17" to a late 2006 mbp 17"(A1212). I've found that there is an issue with the temp sensors that makes the machine run the fans full blast whenever the case cover is in place (they will slow down if the lid is flipped up for several minutes so it seems that it's extra sensitive). I'm curious if anyone knows anything more about this since I'd prefer to take the whole case top from one machine to the other rather than just the keyboard.