✅ Features:
- Set any HA Action for Button presses (Single, Double, Triple, Down, Up, Long)
- Single Button Dim any or all buttons (optional)
- Dim Direction Start Boundary - sets dim direction at start of dim; upward if below, downward if above
- When Dim Function is Enabled
- if the Light is OFF, Long press turns on the Light then Dims
- Basic Actions for Button Up and Long Press are disabled
- Dim Fine Tuning - Dim % per Step and Step Interval (time delay between steps) allows for you to tune dimming as you'd like
Tested in my home with a 4-button Legrand low voltage momentary buttons.
You have impeccable timing. Just installed my i4 + wall plate after weeks of putting it off and this made it far easier to set up than even Shelly’s own solution for controlling shelly lights from an i4. Thanks
I will have several push buttons (normal) connected to a zigbee relay. The relay is also connected to the power supply.
We will have several zigbee lights creating a group and connected to the power suply all time so they are always on zigbee mesh.
What I want is to use the push buttons to toggle the status of the lights and if HA is down been able to switch the lights. I would also be able to toggle lights from HA. Ideally it would be great to change dimming from push buttons but not mandatory. what I want is a fallback in case HA fails, and for my wife and kids for been able to use push buttons.
this blueprint has been tested with Shelly i4 (both DC and gen3) which do not control a load directly, aka ‘detached’. Since Shelly uses the same base code / command set, this BP should work fine for all normal Shelly relays (zigbee, wifi, bluetooth) which have a switch input (I think they all do). I do not have any other Shelly relays to test with so cant verify it.
as I explained, you need to use a normal Shelly relay, the blueprint will handle syncing with HA, and a normal relay has physical switch inputs. You literally have a diagram that shows exactly that. If your puck lights themselves are ONLY Zigbee, not connected directly to a switch (which is what a relay is) then of course you cant control them when zigbee is not running.
Question: should there be 4 x dimming_active variables? So that multiple inputs can be held at once?
e.g. a button1_dimming_active, button2_dimming_active, etc.
I haven’t tested what happens when multiple inputs are long held yet!
Hi @ps-jay, not sure what adding a transition variable would accomplish. Shelly i4 devices are not dimmers themselves, thus do not natively support Transition Time. Using the variables Dim % per Step and Step Interval together will control how much light change occurs, over what period of time… thus it somewhat mimics transition time. If you want a button press (not a hold) to do dimming then you can create that in the Action however you want.
I dont know if the i4 is designed to detect simultaneous presses or holds (meaning two or more buttons pressed at exactly the same time can trigger a different events in the device (and be sent to HA). I have not seen mention in the documentation of “simultaneous-press detection” as a separate event.
I can see if anyone on the dedicated Shelly forums/groups know. LMK if you modify the code and get it working.
That has nothing to do with the blueprint.
Transition Time is set directly on the Light Entity. Add the Entity to the ‘Basic Actions’ on any button then set the entity properties/values as you’d like…
Nice work! I have a request. Could you elaborate a bit? If I don’t want to use buttons 3 and 4, it won’t work. I’ve modified your blueprint to only show buttons 1 and 2, but could you also add a toggle switch so I can choose which buttons to use? And finally, is there a way to have the lights turn off when I press a single button while the lights are on?