All lights ON or OFF

Hi,

I would like to have two button on HABPanel based on items (lights):

  • All lights ON
  • All lights OFF
    What should I use in case of: XXX
    sendCmd(‘XXX’, ‘ON’)
    sendCmd(‘XXX’, ‘OFF’)

?

Thanks!

You might look into the use of Groups.
Or,you might dedicate an Item for this purpose, and write rules to carry out the wanted actions.

I have “Lights” group like:
Switch HallPlugSwitch “Hall Plug” (gFF_Hall, Lights) {channel=“zwave:device:1b7d2486:node2:switch_binary”}

And I have this in openHab basic sitemap…
Switch item=Lights mappings=[OFF=“All Off”]

Which works fine but how to get it into HABPanel?

Found it… :slight_smile:

This works

<button class="btn btn-warning" ng-click="sendCmd('Lights', 'OFF')">
    <span class="glyphicon glyphicon-off"></span> It's on! Switch off
</button>