Any shelly-like device for high ambient temperature(50 °C or 120F) environment?

I need to install a smart switch in the attic to control the fan there, and there’s no easy to put the controller anywhere else because of wiring. I’m wondering if there’s a device that can be used in high-temperature environment? The manual of Shelly 1 plus requires an ambient temperature below 40°C, and my attic could easily go up to 50°C in summer.

Oh and the reason for Shelly-like device is because I want to hook it to a flip switch, so better to have an input pin.

Thanks!

Use and ESP device. According to the ESP32-WROOM-32 Datasheet the operating temperature is –40°C~ +85°C. That along with a simple relay module and a power supply and you’re all set.

Yes building a customized switch with ESP32 and a heady duty relay will be my last resort. Yet I’m not an excellent electrical engineer and surely my design will be way worse than the large sclae manufactured UL-listed ones.