Update items triggers "received command"

Hello,

always I add a new Item to openhab the .items is saved… that triggers my rules… and the shades go down…
Can anyone help me with the command, rule, syntax or has a workaround?

Thanks

rule “RolladenSZ_Control”
when
Item RolladenSZ_Control received command
then
switch(RolladenSZ_Control.state) {
case 1: sendCommand(RolladenSZ, UP)
case 2: sendCommand(RolladenSZ, STOP)
case 3: sendCommand(RolladenSZ, DOWN)
}

end

You’ll likely need to provide more configuration information before this can be solved (Item defns, other Rules, and how you have persistence setup)

… But as a WAG, I’d say you have another Rule, firing on either:

  • received update or;
  • changed to <state> (with no from <state>)

that’s turning around and making a call to sendCommand(RolladenSZ_Control, 2)

It’s likely a scene you use to shutdown the house, close blinds etc, maybe even one attached to state from the Astro binding.

But now we’re in serious WAG territory :smile:

Anyhow, with more detail about the setup, I’m sure someone will chime in with more directed answers…

Many thx, I was on holiday, so I couldn’t check…

I will and I will report, have a nice day…