There is a small company making dimmers in about the same formfactor as a sonoff dual and single. These Single and Dual dimmer boards have open source firmware.
Supported since version 6.4.0 as ARMTR Dimmer (56)
The dimmers contain an ESP8266 for the wifi connection and an Atmega328 which monitors the mains frequency and dimm the lights using a triac and phase controlled dimming. Communication between the two is done using the serial port at 115200 baud. The dimmers contain extra connections (pin headers) for a 10K potentiometer. When this one is connected you get 10 step dimming of the lights which overrides the tasmota dimm level. This feature also works when the Tasmota firmware is non-functional, so it is nice as a fail safe feature. The setting of the potentiometer is fed back to the Tasmota firmware, so when the potentiometer dimmer is turned and the Tasmota setting overridden, the value in the Tasmota channel is representable of the dimmer value.
Phase dimming is not for all lights. Most incandescent bulbs will work, but for LED and CCFL bulbs you will need the special dimmable versions of these lights. The large Blue/Yellow Swedish furniture store has some nice ones. Because these dimmers come in a small package, they lack a bit on the safety and interference side. A good idea would be to add a 1A fuse in the AC line and a R/C Snubber on the output. I also read somewhere that they work less well on 110VAC but this could probably be solved using a firmware update. The ESP8266 and Atmega are isolated from Mains. The used 220v-5V converter is the tried and tested HiLink 5V 0.6A PM01, but without the case.
For now, to use these dimmers you need to take it apart and flash new firmware to the ESP8266 and the Atmega328p using the Arduino IDE. The whole process is quite well documented for the single and dual dimmers. But you do need a USB to serial bridge, at best one with the DTR and RTS signals broken out as well. The software can be found in two Github repositories, for the single and dual dimmer.
The Armtronix dimmer can be used in the Tasmota firmware by uncommenting the line
#define USE_ARMTRONIX_DIMMERS in my_user_config.h and setting the module to ARMTR Dimmer.
The Dual dimmer has a dual color led, which for now shows the wifi status of the Tasmota firmware. But this can be changed in the Tasmota firmware.