Toggle state of two HUE devices in a rule forgets the second one

Hi,

I have a few simple rules which just toggle the state of hue bulbs depending on a switch state eg:

rule “RULES.LIGHTSWITCH”
when
Item myswitch changed
then
bulbItem1.sendCommand(myswitch.state.toString)
bulbItem2.sendCommand(myswitch.state.toString)
end

Problem is that regularly the second bulb does not get the change.
Both are reponsive, both react in “single mode”, both react in HUE app. Why is the second line missed? Do I have to put in a wait? Should I listen to a kind of callback of the first line? Will it be safer if I use a group instead of single calls?

Any help appreciated!

Although this doesn’t answer your question, perhaps you should take a look at the FollowProfile, which may fulfill your requirement if I understand it correctly:

Regarding your rule, no delay should be needed. What’s in your logs? Which binding are you using? If Hue, API v1 or API v2? How does your item definitions looks like?

Logs are empty
Hue Binding
API v2

Things and items are created via txt-file and are working as intended (as long as not being adressed directly after another). And the mentioned rule is an example.

I have several of those rules with different hue items and it’s always the 2nd, which “misses” reaction.

Didn’t know “FollowProfile” property - will have a look at this - ty!

I didn’t know if this is still the case but it used to be that if you send commands to Hue too fast some command get lost. You can try to add a short sleep or use a timer and see if that’s happening here.