So I configured this Selection item:
Everything works perfectly, (so don’t waste your time analysing my Code ;P)
except for the change of a item.
When I change from one selection item to another, it doesn’t change the LED strips (so therefore the rules doesnt get activated) and I have to select the item again.
Am I missing something here?
I’m pretty sure your rule does not work perfectly (well, you wouldn’t have asked…)
Please consider to type the code in a more readable way.
Even after not analyzing your code …
Was it your intention that gArilux and gYeelight is switched off exactly 90 Minutes after switching it on, regardless what you are doing meanwhile?
What do you mean by
When I change from one selection item to another
which “other selection item”?
Please be aware that you don’t need to set the mapping in an ascending order, so your rule would be way more readable when changing the selection slightly:
There’s always something you could improve, even if it works like it should! )
The Code was pretty readable but the code fences (´) made them look like this.
Yes, they should turn off after 90 minutes, after every selection change.
I’m sorry, it happens after every change of THIS selection item.
If I choose “case 1” the first time, rules don’t trigger and I have to repeat choosing “case 1”.
It’s not that big of a Problem, but I noticed this quiet often even with other Selection items.
Thank you, but isn’t the Timer instance set to null anyway?
I already set it to null in my file, just didnt copied it, sorry my bad!
Very clean and readable code, thank you!
I really have to invest more time into this programming language. XBase is not that hard, but it’s a pain to find out what works and what doesn’t.
Yeah, I have those Problems on many rules. I already even noticed it when my lights go out too early.
I’m just too lazy to change it ;).
And It’s not a matter if they go out too soon.
Oh okay, thank you Udo.
You probably need to use receivedCommand instead of gLEDcolor.state in the Rule. This could explain the multi-selection problem @Nico111 is seeing. With received command triggers, the Rule triggers before the Item registry is updated. So it is best to use the receivedCommand implicit variable.
I’ve used the code fences from this sentence you’ve wrote:
This is a sentence with some code in it.
Thanks, I already know your post
Allright I will update my rules and add some feedback to this Post:stuck_out_tongue: