Set dimmer on 100% when swiched on

Moderator: leecollings

Post Reply
Chillertje
Posts: 2
Joined: Tuesday 04 September 2018 21:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Set dimmer on 100% when swiched on

Post 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
}

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest