Hi, my weather station sends for rain the command “ON” and for no rain the command “OFF”.
openhab.log:
2016-03-28 09:10:23 - Rainsensor received command OFF
2016-03-28 09:11:54 - Rainsensor received command OFF
2016-03-28 09:13:28 - Rainsensor received command OFF
2016-03-28 09:15:01 - Rainsensor received command OFF
item:
Switch Rainsensor { knx=“<(60)3/7/9”}
What is your proposal or idea to best transform the value “OFF” into “It’s not raining” and the value of “ON” into “Its raining”
The link John posted does include the following example
Let’s make a small example to illustrate this function. If you have a sensor which returns you the number 0 for a closed window and 1 for an open window, you can transform these values into the words “open” or “closed”. Create a map file named window.map for example and add the desired keys and values.
0=closed
1=opened
UNDEFINED=unknown
-=unknown
No, you can name the .map file to whatever you like, cause you specify the file to be used in your item mapping.
But for better readability, it makes sense to call it “rain.map” in your case.