Page 1 of 1

Bug in dzvents for Selector ?

Posted: Thursday 11 December 2025 19:14
by TiXav
I am not sure but I think I found a little bug in dzvents
For a selector (Of level not hidden) dz.devices("MySelector").active is always false, so I found for the moment this solution at start of my scripts:

Code: Select all


	local xActive=device.active
		
		if device.deviceSubType=='Selector Switch' then
			if device.levelVal~=0 then xActive=true end
			dz.log('selector device.Name: '..device.name..' level'..device.levelVal..' xActive= '..tostring(xActive),dz.LOG_ERROR)
		end

then I can use xActive for Switches AND Selectors in several generic code instead of directly testing .active and testing selector each time

Can someone confirm? or I am using .active in a bad way...

Re: Bug in dzvents for Selector ?

Posted: Saturday 03 January 2026 19:12
by TiXav