Hey everyone, I’ve been tinkering with my Fibaro dimmer setup and wanted to share a neat workaround I discovered. If you’ve noticed that your dimmer ‘remembers’ its last position, you might have struggled with getting it to reach full brightness with a single press. Well, I’ve figured out a way to make it happen without losing the dimmer functionality entirely!
Here’s the deal: when you press the switch once, it goes back to the saved position. But if you want it to jump straight to 100% brightness, you need to do a quick double press. It’s a handy trick, but I wanted a more seamless solution—especially for family members who aren’t tech-savvy.
So, I dove into the scene settings and came up with a Lua script that automatically forces the light to 100% when you toggle the switch. The best part? It still respects the dimmer’s memory for other times. Here’s how it works:
- Create a Scene: Triggered every time you turn on the specific light.
- Modify the Trigger: Add a line to identify the device calling the scene.
- Add Lua Code: This checks if the light is being turned on from the switch and then sets it to full brightness.
For those who want to take it a step further, I even added a time-based adjustment. Now, the lights dim automatically during late-night hours for a softer glow, and brighten up during the day. It’s like having a personal lighting assistant!
Here’s the code snippet for anyone interested:
lua
if (lul_device == nil) then
luup.log(“Not triggered from a device”)
return false
end
local dim = luup.variable_get(“urn:upnp-org:serviceId:Dimming1”, “LoadLevelStatus”, lul_device)
local bin = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”, “Status”, lul_device)
if dim == nil then dim = -1 end
if bin == nil then bin = -1 end
dim = tonumber(dim)
bin = tonumber(bin)
if (dim == 0 and bin == 1) then
luup.call_action(“urn:upnp-org:serviceId:Dimming1”, “SetLoadLevelTarget”, {newLoadlevelTarget = 100}, lul_device)
end
This little hack has completely transformed my lighting setup. It’s all about finding those small tweaks that make smart home living truly seamless. If you’ve got similar tweaks or questions, I’d love to hear them! Happy tinkering! ![]()