Sonoff D1 Dimmer - possible to add physical switch?

I’m considering to buy a couple of these to turn a pair of dumb night-stand touch lamps into dimmable smart lamps. In order to keep the touch on/off functionality, I think I’d need a momentary input that toggles on/off. Is this currently possible with the Sonoff D1 Dimmer?

I think a Sonoff Mini could do what I want out of the box, but my wife thinks dimmable would be nice and worth the couple extra dollars.

This one works for me

Managed to flash them with Tasmota OTA

Apologies jumping on an old thread but I’ll add a solution for future people. I was just searching for the same thing for the D1 and couldnt find anything. I know with the sonoff basic you can solder a switch into the gpio (tasmota documented this).
So I cracked open my D1.
I’m using ESPHome so cant document for Tasmota these days, its been a while.

With a steady hand you can solder a wire to the GPIO0 or GPIO4 pins (perhaps even GPIO2), then you need to add a second wire to ground for the switch to work as pullup toggle. Then you just need to add a connector to the case, maybe some terminal wires or better yet an aux jack. Then you just need to wire any old switch to the connector, and you can trigger an event to the esp8285. I can document this fully if needed, so far i’ve tested this by shorting it by hand with a wire. Do NOT power this with 120-250v while testing, just plug a 3.3v connector into the board directly.
Also, when flashing remember to short GPIO0 to ground to trigger flash mode, it took me a while to figure it out. GPIO4 might be better for a switch than 0, because if it restarts with the switch on it will go into flash mode.

Heres my config from esphome:

  - platform: sonoff_d1
    id: relay
    use_rm433_remote: False
    name: Sonoff D1 Dimmer
    restore_mode: RESTORE_DEFAULT_OFF
    gamma_correct: 0.0
    default_transition_length: 1s
  - platform: gpio
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "Dimmer Button"
      - light.toggle: relay
1 Like

Going to give this a go. I’m going to use GPIO4 pad.
Did you run into any problems or other feedback before I get stuck in?