Described is a security sensor comprising two or more sub-sensors for use in a variety of installations where different magnetic fields may be experienced by the security sensor as a result of the variety of installations. One of the sub-sensors may have a low magnetic sensitivity while the other sub-sensor may have a much higher sensitivity to magnetic fields. In operation, one or both sub-sensors are used to determine if a door or a window has been opened.