When the light is switch on at 50% brightness, then I want to set the brightness to 100% for 5 min, I'm using this command:
VoorDeurLight.dimTo(100).forMin(5)
It will switch to 100% but it doesn't go back to the 50% after 5 min. How can I achieve this?
dimTo for X minutes, will this work? [Solved]
Moderator: leecollings
-
rgroothuis
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
-
rwblinn
- Posts: 72
- Joined: Wednesday 10 June 2015 21:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4
- Location: Hamburg (Germany)/Middelburg (NL)
- Contact:
Re: dimTo for X minutes, will this work?
Use
Tested with following dzVents snippet:
Code: Select all
.afterMin(5)
Code: Select all
local IDX_SWITCH = 49
return {
on = {
timer = {
'at 16:33',
}
},
execute = function(domoticz, timer)
-- Get current dimmer level
local dimmerLevel = domoticz.devices(IDX_SWITCH).level
-- Set dimmer full level
domoticz.devices(IDX_SWITCH).dimTo(100).forMin(1)
-- Set back to previous level
domoticz.devices(IDX_SWITCH).dimTo(dimmerLevel).afterMin(1)
end
}
-
rgroothuis
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dimTo for X minutes, will this work? [Solved]
Thanks, looks like this is working for me. Thanks.
Who is online
Users browsing this forum: No registered users and 1 guest