Switch Button in OpenHAB

how can I use switches as I am used from home-assistant?
I want to trigger a switch from the dashboard.

All steps needed for this:

  1. install mqtt addon
  2. create a mqtt bridge (with credentials for the mqtt broker) choose the id wisely, yo u can’t change ist
  3. create a mqtt generic thing and link it to the bridge, created under .2 choose the id wisely, yo u can’t change ist
  4. select and “enter” the newly created thing, create at least one channel (type is switch) choose … you got it anyway…
    Set stateTopic to something like stat/…/POWER (the status topic of your switch)
    Set commandTopic to something like cmnd/…/POWER (the topic to set the switch)
  5. select the channel and link to an Item. openHAB can create an Item for you, but… as said… Maybe change the name of the Item to a simple yet meaningful one.

At this point, you should be able to use the Switch through the Item. You then can use the item in pages (the overview page is the dashboard…) or sitemaps.

Many thanks for the reply and the explanation.
The points 1-5 described above are clear to me. Settings look promising:

But it does not appear as expected in pages. I tried slider cell, knob cell and cell so far.


Try Add Row—>Add Column—>List Card

Then you can add Toggle List Item (or Label List Item, etc.)

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.