How should I model a stateless button?

Sorry if this is a n00b question (i am a noob) … but … i am building a new binding for the Somfy MyLink rollershade system that includes “Scene” control as well as Shade control. However, the system is “stateless” in that you can’t query it for the state of a scene or a rollershade. You can only command it to Up, Stop, Down on a shade and trigger a scene.

I have modeled the shades in my binding with a RollerShade channel type. This gives me Up, Down and Stop commands which are working well.

However, i’m looking for guidance on how to model the scenes. Modelling them as a switch means i should know the state of them (on/off). But in this case i just want a Button to press to trigger that scene.

Hopefully someone can point me in the right direction fairly easily, as i am sure other bindings must have come across this before?

thanks.
chris.

I use a rule that resets the button via postUpdate to the item. That way the OFF is never send to the bindings.

Thanks J-N-K, but i’m just trying to do this all within a binding that a user will install. Not just in my install. Unless i am missing something making a rule wouldnt be possible in a binding? (sorry im new to all this so i am likely wrong about this!)

Oh. My fault. Didn‘t notice you are developing a binding. Then you could update the state to off in handleCommand after you received a on-command.

I see … so to a user it would look like they toggle it on and it immediately would toggle off? I guess that would work! I’ll try it out and see how the interaction feels.