Replaced motion sensor light switch; extra red wire in wall
Yes you are fine the extra wire is so you can install the switch in a 3-way switch set up. Where you would have two switches controlling the same light in different locations like a hallway.