Shelly dimmer 2 sends only long push

I’ve connected a shelly dimmer 2 to a push button. Button type is “detached”. No matter what type of push I apply to the push button (single, long or double), the click type seen in HA is always “long”. Here’s the json response from the event viewer after a single push

event_type: shelly.click
data:
  device_id: 0cb3db7867669f14d5560252bad5abc4
  device: shellydimmer2-3C6105FE0A5C
  channel: 2
  click_type: long
  generation: 1
origin: LOCAL
time_fired: "2023-01-30T21:05:46.827411+00:00"
context:
  id: 01GR2803TBRKNA7FFJ1YRH50FN
  parent_id: null
  user_id: null

As you can see, the click type is “long” instead of “single”

and here is the json response for a double click

event_type: shelly.click
data:
  device_id: 0cb3db7867669f14d5560252bad5abc4
  device: shellydimmer2-3C6105FE0A5C
  channel: 2
  click_type: long
  generation: 1
origin: LOCAL
time_fired: "2023-01-30T21:06:07.102824+00:00"
context:
  id: 01GR280QKY1EJRAG30Q9BVX2K6
  parent_id: null
  user_id: null

Again, the click type is “long” instead of “double”. Firmware is up-to-date. What am I doing wrong or is this a bug?

It turns out that I accidentally wired the push button with inverted switch:

  • not pushed: shelly input connected to 220V
  • pushed: input disconnected

This leads to the described behavior. I could get a short push event by releasing the button and immediately pressing it again.