Shelly Device switch template for each click type

HI,

thanks for this Blueprint!
it works for me… partially…
It seems that shelly 1 added via official integration double and triple clicks are not recognized.
Only sigle and long works.
Am I doing something wrong?
I would not prefer to migrate to MQTT

Hey,

I have the same issue with Shelly1, seems they don’t trigger any specific events for double & triple click…
So we just can’t handle them in HA.

I don’t have any workaround for this since I just don’t use them. But would definitely be a good idea to report this issue on the Shelly official Integration side.
Keep me posted :slight_smile:

Hi thanks for the reply and checking.

Digged a little… according to Shelly API page Shelly1 support only single and long push
Need to rearrange Shellies location since I have a couple of 1Plus that accept double and triple push too

1 Like

Hi @nok, in description you wrote you have a Dimmer. I just tried this automation with my Shelly Dimmer and for me it fires only single and long events for shelly.click. Do you have double clicks? I would like to use double click to change brightness to 10% and 100%.

Dimmer has set Button type: One button mode - dimmer is controlled with single switch. using the WebGui.

Thanks!

hi @palito,

I actually have a couple of shelly dimmer in my installation. However I didn’t link them to any physical switch… They are actually used in script which are triggered by the shelly1’s physical switch.

I won’t be able to experiment myself but if double clicking on it doesn’t send a double_click event, I’m afraid you won’t be able to do it using this blueprint :slightly_frowning_face:

As far as I know, they don’t support double click.
Keep me posted !

1 Like

Hi @nok, I’ve googled it a little but it look like the dimmers doesn’t really support it and Shelly should already have feature request for it opened. I’ll write them… Thanks a lot!

Any updates from Shelly?

Hi @davemenkehorst, no and I won’t have any if I won’t see it by myself in the release notes. They closed my support case with a link to feature requests page. So I’ve submitted a feature reqest but it doesn’t have any interface where I could see in what state the request is or whatever… :expressionless:

Hi everyone,
is anyone using this with Shelly RGBW2? I’ve switched the button in the device settings to Detached mode and now I’m able to turn the device on by HA, but the event ‘long’ is visible in HA after 4-5 seconds which is really long. The input is switched by the motion sensor so I don’t have any ‘short’ events. So the light is now switched after a long time. I’m using the Shelly integration with CoAP and it was working fine for me until now but now I would like to do more advanced stuff in HA. Should I switch to MQTT? Is anyone having the same late response for ‘long’ click event in HA?
Thanks!

EDIT: Nevermind. I’ve flashed the device to ESPHome over the air and coded all what I wanted right on the device and it’s perfect.

Wow, nice one !

@nok is there any solution to marothes problem?

I am struggling with two problems.

  1. The light only turns off and on if i turned it on before with my lovelace button for the light bulb.

  2. It only turns off by switching the physical switch twice.

Hi @MaxGroh, have you tried my solution from a couple answers above? This works pretty flawlessly for me to be honest. Altough like I said, not using the blueprint anymore, as I did not need it, but I can turn on the lights with the switch or in the UI and I can see it’s state.

Sorry, @marothe i forgot that i owe the community an answer. :blush:

My solution to the problem is to swap the switch for a pushbutton.

I use the blueprint unmodified.

This works fine for me.

2 Likes

I used this unmodified Blueprint for the Shelly Button1 (which has a Short, Double, Triple, and Long Press). Works great, cleaned up a bunch of automations.

Note, if you do use the Shelly Button1, you have to update the firmware, then go into the button’s web interface (works best when plugged in or the web server turns off after a few seconds) and set the CoIoT server to point to your HA server.

Anyone know how to use if I have a normal one-off switch and not a momentary switch. Turn switch on registers as long click but turning it off does nothing in events.

Does anyone know how to ‘count’ clicks? I really want to use double click but I have a number of Dimmer2 modules. They only seem to support single and long press.

Thanks for the template. Much appreciated!

Anyone being successful with double click together with a dimmer yet? I assume a workaround would be to send web hooks from the device but it would be nicer to keep using the integration.

If you want to stay within the integration, how would you like to dim, if longpress is used for a different function? I believe this is something allterco will not change.
I would like to raise the question why to change a quite obvious solution like dimming by long pressing. Basically, this means developing a completely new software for the dimmer.

I’ve just changed the factory firmware on all Dimmer and Dimmer2 devices to ESPHome. All over the air, no need to connect via cables to flash firmware. If you would like to have the instructions with code let me know.

2 Likes

Yes please, would that create a official 2 click option? This way I could create a consistent way of dimming across the dimmer 2 from shelly and fibaro