Quantum sensors based on color centers in diamonds have potential applications in different fields from the biomedical, electronic and battery technology sectors to space applications [1]. They can sense magnetic fields B, temperature T, electric fields E, strain fields and pressure [2]. When used as thermometers, they provide milli kelvin and sub milli kelvin sensitivity. Here we report on a sensing protocol in which one can switch between temperature and magnetic field sensing modes in a nitrogen vacancy based sensor. This is under an optically detected magnetic resonance detection scheme with frequency modulated microwave signals and in double resonance excitation mode [3]. This protocol allows the suppression of magnetic field interference up to two orders of magnitude in temperature sensing mode. This can be done by tuning the relative phase of the frequency modulated microwave signals. Moreover, phase tuning allows suppression of temperature effects in magnetic‑field sensing by up to two orders of magnitude and can also correct asymmetries in the double‑resonance mode. Using the mentioned protocol, we monitored temperature variation in diamond due to MW excitation pulses with mK resolution. References: [1] N. Aslam et al., Nature Reviews Physics 5, 157 (2023). [2] P. Neumann et al., Nano Letters 13, 2738 (2013). [3] O. Moussa et al., Journal of Magnetic Resonance 249, 24 (2014).