On/Off button combined with httpcommander

Hi all,
Is it possible to toggle a device (with httpcommander) on AND off with the same button? If yes, how should the if then else setup be?

You could, for example set up the “Power Button” from the simulation plugin (nymea-plugin-simulation).

Then you create rules for the appropriate commands when that button is toggled on and off.

Hope this helps.

Right, but the thing is that i want to make a “scene” with just one button to turn it on or off. So i took the on/off button first an attached the rules to it, then i wanted to create a scene with the simple button to turn it on if the state is off, but the state unfortunately is not supported as it seems.

Yeah, I think the “ON/OFF Button” is different than the “Power Button”… The former just has 2 actions “turn on” and “turn off”. The latter has a boolean state.

1 Like

Aah you mean the “toggle button” :slight_smile: thanks!

Yeah… I think I we should probably clean that stuff up a bit…