Page 1 of 1

Wildcard in variable

Posted: Thursday 07 June 2018 15:34
by psolyca
Hey,

After a try with LUA to automate my lights, I have switched to dzVents.

By the way, I have managed to do what I wanted, change the state of my virtual switches without triggering an action with the use of a UserVariable.
But I would like to simplify my event script.
I have seen in the wiki that a wildcard could be used with devices to monitored them :

Code: Select all

return {
	on = {
		devices = { "PIR_*" }
	}
}
I did not see neither on github nor on the wiki nor on this board a discussion about the ability to have a wildcard to monitor UserVariables !

Code: Select all

return {
	on = {
		variables = { "PIR_*" }
	}
}
Could it be a new feature ?

Re: Wildcard in variable

Posted: Thursday 07 June 2018 23:12
by waaren
It is already implemented. Wild card handling is generic so not only for devices but also for variables an other triggers.

Re: Wildcard in variable

Posted: Friday 08 June 2018 8:26
by psolyca
Thanks.
I tried yesterday for my first test script it did not work but after some work on it it is ok this morning.

So wiki is not up to date unfortunetaly.

Re: Wildcard in variable

Posted: Friday 08 June 2018 11:27
by dannybloe
Ah, indeed.. it doesn't mention this in general. I added this to my to do list.