Smart sensing systems suffers complexity requiring interface circuits, microcontrollers, switches, and actuators to detect and sense, process the signal and take a decision, and trigger an action upon demand. This increases the device footprint and boosts significantly the power required to actuate the system. Here, we present a hybrid sensor and switch device, which is capable of accurately measuring gas concentration and perform switching when the concentration exceeds specific (safe) threshold. The device is based on a clamped-clamped microbeam coated with metalorganic frameworks (MOFs). Using the electrostatic harmonic voltage, we employ dynamic multi-modal actuation in which the microbeam is simultaneously excited at the first mode of vibration, near the pull-in band, and at the third mode. We demonstrate experimentally the effectiveness of this technique in measuring the concentration of water vapor and achieving switching when the concentration exceeds a threshold value. In contrast to a single mode operation, we show that employing multi-modal excitation enhances sensitivity, improves accuracy, and strengthen noise immunity.