[SOLVED] Wrong number of lights "ON"

Group:Switch:OR(ON, OFF)	Lights	"Aantal lampen aan: [%d]"	<light>
Group:Switch:OR(ON, OFF)	LightSwitches	(Lights)
Group:Dimmer LightDimmers	(Lights)

The number of lights on my sitemap is wrong (6 where it should be 4). All lights (1 is a dimmer) are controlled by KNX and are working as they should. Any pointers on how to debug or solve?
Error started to appear after upgrading from KNX1 to KNX2.

You’ll need to specify some kind of aggregate function for the Dimmer type Group as well. I don’t know what will actually work with Dimmer type.

Looks elevant -

Possible work around for snags

Is this behaviour changed between versions?

And how does this influence the total? I only have one dimmer defined and the total is off by more than one. Furthermore, next to dimming, a dimmer can be switched on and off in one command. I’d think a dimmer is ON from the moment the brightness is more than 0%.

Anyways, when I leave out the dimmer, the total is still wrong. (now it says 1 while I count at least 3)

There certainly have been issues with Group aggregate functions, can’t remember which release, 2.2? but you haven’t told us what version OH you are using anyway.

Dimmer type Items are stored as percentage, not ON/OFF, so any aggregation function needs to be smart enough to do a conversion and also needs enough info to know what conversion is required - for ON/OFF, Average? etc.

This looks relevant for behaviour with nested groups

I see.

So I got rid of the nested groups (assigned groups at item level) and the total is correct now. Only the dimmer is to be added. Maybe this is doable with a proxy item (switch) that I can updated by a rule (if brightness > 0%, set state ON…)?

Or is there a more elegant solution?

Have you tried putting Dimmer Items in a Group of type Switch? (with some ON/OFF aggregation) I’d expect that to work.

1 Like

It was indeed that simple.

To summarize:

  • assign groups at item level and not using nested groups
  • dimmers can be added to a group of type switch
1 Like