I am not sure about the sensor. The diameter of the tyre should remain the same before and after changing the rim. For example, if the tyre is 225/55/16 before, the new rim should be fitted with a tyre of either 225/45/17 or 225/40/17.
FYI, for a tyre of W/A/R spec, the diameter is calculated by (W*A% + R * 25.4) mm.