How am I supposed to port a 3 state switch?
My states are 0=Off, 1=Heat, 2=Cool.
I need to display a 3 state switch in the semantic model page.
Here is my Item Number Heating_Mode "Heating Mode" <home_thermometer_outline> (eHeatPump) ["Status"] { channel="modbus:data:plc:heating_poller:heating_mode:number" }
This used to be really simple in openhab2, but I cannot figure out how to do in 3.
EDIT: I am looking for a solution that does NOT use sitemaps. Just pure .item files tagged properly to transform this in a 3 state switch:
this question is asked pretty often. If you search the forum for “three state switch” or “item with multiple buttons” you will find what you are asking for. Here is a list of at least five topics regarding your question:
Hi @franks,
I already searched the forum before submitting my question. However I get the threads you recommended a try.
N° 5 in my very same question though, so I am not sure what you tried to suggest there.
N° 2, 3 and 4 have nothing to do with semantic model (questions were asked in '15 and '16, long before openhab 3 was released).
N° 1 was asked by and seems to use sitemaps to build a 3 state switch if I am not mistaken, so no semantic model there too…
As you can see, there is nothing that helps answering my question.
Thank you anyway
That’s largely because your question really has nothing to do with the semantic model. You need to implement it as described at one of links 2-4 and then define a default stand alone widget and default list widget as described in the first link.
All the semantic model does is give meaning to your Items. It doesn’t actually implement anything. Creating a three state switch requires you to implement something.