Hi All, I really don’t know much about rules etc so might be a dumb thing.
I have the rule below and watching the logs, it seems to hang up and can’t send the command to item 123KitchenNextSource_LightChannel
rule "Kitchen Source Next Previous"
when
Item KitchenSource received command
then
switch (receivedCommand){
case ON: {
123KitchenNextSource_LightChannel.sendCommand("ON")
}
case OFF: {
124KitchenPreviousSource_LightChannel.sendCommand("ON")
}
}
end
It appears that it doesn’t recognise that the items start with a number according to the logs.
Rule 'Kitchen Source Next Previous': The name 'KitchenNextSource_LightChannel' cannot be resolved to an item or type;
When I run the switch by itself, the log shows it works fine
123KitchenNextSource_LightChannel changed from OFF to ON
Any suggestions short of renaming all the items?
Thanks Josh
I don’t recommend that you start your item names with numbers.
In your log it looks like the rule interpreter skips the number at the front of the name.
I am afraid but you may have to change your naming convention.
If leading-number names are being auto generated but subsequently not useable in rules, that looks like a bug to me. Are the numbers here some peculiarity of the binding in use?
It’s part of the Cbus binding. The numbers aren’t essential but everything is addressed by a number and also name. It’ll just mean manually swapping the number around to the back or something.
I couldn’t find anything before hand in the search so thought there may have been an easier way around it.
It’s not easy to find, suggesting it is uncommon i.e. not many folk get auto generated names that fail. Which is why I wondered if the binding was behind that.