Show NULL Items in Group

Is it possible to create a Group that lists all items with the current state NULL?
I use a few configuration-items as “workingday, vacation, present, summermode, heating…” and even if I use persistence, it sometimes happens that my rules weren’t executed because such an option is NULL.

Group:Number:OR(UNDEF,NULL) gCheckSensorStates "State [%s]"

rule "check sensor uptime state"
when
	Item gCheckSensorStates changed
then
	if (gCheckSensorStates.state==UNDEF) {
	val triggerItem = gCheckSensorStates.members.filter[i|i.state == UNDEF]
	pushover("Ein Sensor ist ausgefallen: "+triggerItem)
	}
end

works for me to check for an UNDEF trigger.
I guess you need just to change the order of NULL and UNDEF …

2 Likes

I just tried it with an error-check-sitemap with this kind of entries:

Switch item=Anwesenheit visibility=[Anwesenheit == NULL]  mappings=[OFF="aus",ON="an"]

works, too - but your solution looks more professional.