Page 1 of 1

dzVents set dimmer level

Posted: Thursday 24 August 2017 14:12
by Pappabear
Hello,

I'm very new to domoticz and dzvents.
I have a Fibaro motion sensor and a Fibaro dimmer.
I'm already able to switch the light on and off after motion during nighttime but I would love to set the level of the dimmer with dzVents
(as you would do with a "level xx %" block in blocky), any ideas? I tried several things but nothing is working

Code: Select all

local LichtHal = domoticz.devices('Licht hal')
		
		if (timeofday['Nighttime']) then
			if (switch.state == 'On') then
--->				LichtHal set level dimmer
				LichtHal.switchOn()
			else
				LichtHal.switchOff()
			end
		else
			LichtHal.switchOff()
		end
Tnx,
Luc

Re: dzVents set dimmer level

Posted: Thursday 24 August 2017 16:21
by elmortero
you are looking for this:
then
LichtHal.switchSelector(TheLevelYouWantTOSetItTo) --> the level is Numeric
end

It is explained in the dzVents Wiki

Re: dzVents set dimmer level

Posted: Friday 25 August 2017 10:10
by Pappabear
tnx for the reply

I already managed to do it now with LichtHal.dimTo(percentage)
This probably didn't work before because I used the wrong device name :-(