[SOLVED] Set values to items based on other item

Hi,
I have a Dimmer Item called SALOTTO_WHITE without any Binding
When this item change, i need to set other 3 Dimmer Items with same value.
The 3 dimmer i have to set have a Binding to control some led strip.
I cannot use a group because i need to send command in sequence and with small delay between command. I wrote this rule, I can see the Sliders change them values but seem command is not sent to binding:

rule "Salotto Dimmer Group"
when
    Item SALOTTO_WHITE changed
then
	SALOTTO_RGB02_WHITE.postUpdate(SALOTTO_WHITE.state)
	Thread::sleep(100)
	SALOTTO_RGB03_WHITE.postUpdate(SALOTTO_WHITE.state)
	Thread::sleep(100)
	SALOTTO_RGB04_WHITE.postUpdate(SALOTTO_WHITE.state)

end

Any help would be appreciated.

Marco

Are these ‘just’ Dimmer type Items, or are some Color types?

Hi,
This is dimmer, but as next step I need to do same thing also with color items

Okay, you will need to take care about state not being the same as command.

For example, you can command a dimmer ON but it will take up state 100 or similar.

In the example rule you’ve shown us, no command is sent to your Items, only .postUpdate which will not get sent via the binding. You probably want to use .sendCommand there. I think sending the numeric dimmer state as command should work.

1 Like

Hi,
thanks for help, it work.

Marco