Page 1 of 1

Set dimmer on 100% when swiched on

Posted: Sunday 20 January 2019 19:41
by Chillertje
Hi,

I'm using a Zwave Dimmer (Duwi) to control one of my lights.
When somebody turn on the lights, I would like to have the dimmer set to 100 by default.

I'm using a DzVents script that triggers if the switch is turned on.
For some reason this isn't working. When I use DimTo(100), the lights are automatically turned on again when I Turn off the wall switch or the virual dimmer. This means I'm not able to turn off the lights.

Therefor I created a DZVents script to set the value of the dimmer to 100, when I switch the lights off.
This is also not working and the lights are automatically turned on again.

Does anybody have an idea?

Code: Select all

return {
	on = {
		devices = {
			1890
		}
	},
	execute = function(domoticz, device)
	 if (device.state == "Off") then
        device.dimTo(100).silent()
	    device.switchOff().afterSec(1).silent()
      end
	end
}