Run scene via button

Hi everyone, please help me.
I created scene which do turn off all outlets, but I can’t link this scene to switch button widget in Habpanel.
There is can link only “items” and I need to link “scene”.
How can I resolve this task?

In HABPanal you can’t. A scene is a rule and you cannot call rules directly from HABPanal (you can from MainUI though).

You’ll either need to:

  • edit the scene’s code tab and manually add an item trigger (this is kind of cheating and be careful to get the syntax right)
  • create a rule triggered by the Item that has a single action which calls the scene
  • reimplement the scene as a regular rule with an Item trigger.

Ok, but how right way to create running automation (OFF all switches at home) with button on habpanel?
How do you even make such an implementation?

as @rlkoshak said HABPanel only deals with items, so you need to define an item (probably a Switch) and then rules to perform stuff whenever it turns ON or OFF. Running a scene for example.
Then you just add the switch item to your panel.

It’s different to the Main UI, where you have options available to configure when you press a button, one of them being running rules/scripts/scenes (which are the same concept).