Shelly1 turn on or off with any Smart bulb (without bulb loose wifi connetion)

Hello everyone,
this has been something that has been putting on edge. So i have been using Shelly1 with Shelly button . i am putting all my Lamps smart along with RGBW bulbs. the problem that i had was that if i wanted to do a scene with diferent colors, i had to turn on the lamp 1st, wait for the bulb to connect to the wifi and then i could turn on the scene. in any other way i coudnt make this work. so basically what i needed was to have the bulb always on, but be able to use this Shelly button with a Shelly1 inside, to turn on and off the lamp physically, and not inturrupt the connection to the bulb! and I finally did it… probably I AM SO STUPID and it was probably very easy to do… but i went on my way.
so here how it works.
https://shop.shelly.cloud/shelly-button-wifi-smart-home-automation#64

have your Shelly1 configured like this

then go into Developer Tools - then Events- then where you see Listen to events Write “shelly.click” and start listening to the events. I have made two diferent type of events. a single click and a long click. it should look like this

{
“event_type”: “shelly.click”,
“data”: {
“device_id”: “0ac349a7944e9c52e5bf2d1852e015ab”,
“device”: “shelly1-40F5201DD284”,
“channel”: 1,
“click_type”: “single”
},
“origin”: “LOCAL”,
“time_fired”: “2021-05-03T13:47:28.784079+00:00”,
“context”: {
“id”: “77ed6244317e70ac90bcfc3c94f3c5aa”,
“parent_id”: null,
“user_id”: null
}
}
Event 8 fired 2:47 PM:
{
“event_type”: “shelly.click”,
“data”: {
“device_id”: “0ac349a7944e9c52e5bf2d1852e015ab”,
“device”: “shelly1-40F5201DD284”,
“channel”: 1,
“click_type”: “long”
},
“origin”: “LOCAL”,
“time_fired”: “2021-05-03T13:47:23.913575+00:00”,
“context”: {
“id”: “85931605e44d85969e3d430e8e459f86”,
“parent_id”: null,
“user_id”: null
}
}

and thats it! look for the “device” and that is what you will use for the automation. the only thing i havent figured out is how to make a single automation with these two that ive created. I have a automation to simply turn on or off the light with a single click and for the Long click i made it to change colors! Pretty cool :slight_smile:

alias: 4drt botao Shelly rgbw mesa (Duplicate) (Duplicate)
description: ''
trigger:
  - platform: event
    event_type: shelly.click
    event_data:
      device: shelly1-40F5201DD284
      channel: 1
      click_type: long
condition: []
action:
  - service: light.turn_on
    entity_id: light.4drt_shelly_bulb_left
    data_template:
      hs_color:
        - >-
          {{ (30 + (state_attr('light.4drt_shelly_bulb_left', 'hs_color')[0] or
          0)) % 360 }}
        - 100
      brightness_pct: 100
      transition: 1
mode: single
alias: 4drt botao Shelly rgbw mesa (Duplicate)
description: ''
trigger:
  - platform: event
    event_type: shelly.click
    event_data:
      device: shelly1-40F5201DD284
      channel: 1
      click_type: single
condition: []
action:
  - service: light.toggle
    data:
      transition: 3
      color_temp: 210
      brightness: 255
    target:
      entity_id: light.4drt_shelly_bulb_left
mode: single

1 Like