Fibaro Motion Sensor FGMS001
What I'm trying to do is to switch the hall light for 1 minute at 50% when PIR is activated between 23:00 and 06:30.
dzVents script:
Code: Select all
return {
on =
{
devices =
{['PIR - Trap'] = {'between 23:00 and 06:30'}},
'Lamp Gang'
},
execute = function(domoticz, device)
if
{(device.name == 'PIR - Trap' and device.state == 'On') and
(device.name == 'Lamp Gang' and device.state == 'Off')}
then
domoticz.devices('Lamp Gang').dimTo(50).forMin(1)
domoticz.log('Lamp zolder ingeschakeld door PIR Trappenhuis')
end
end
}
Code: Select all
light.switchOff().checkFirst().afterMin(5)
light.switchOn().checkFirst().forMin(5)
So for now I'm stuck and I can't get this to work.
Any help would be appreciated....