Modular smart switch

I am trying to replace the switches to my fans so that they automatically shut off after a certain amount of time. Requirements are:

  1. Matter support (so no internet needed)
  2. Physical switch, not touch.
  3. Modular

Sonoff M5 looks ideal and fits the first 2, but not sure if they are modular or not. Anything else out there?