I've just upgraded to NodeRed 4.0 and noticed some weird behaviour with the HA State Nodes. When you open a Node to edit it, the "Expose as" field defaults to the first switch in the list meaning you have to remember to change it before saving. Not sure if this is a bug or something I'm missing.