Hi,
i have a problem with a variable witch i use for controling my alarm system.
Number OH_ALARM_Zustand_Soll "Soll" <settings> (AL_Alarm) {stateDescription=""[pattern="%d",min="1",max="4",step="1",options="1=Aus,2=Extern,3=Intern,4=Wartung"]}
With this variable, i control the state of my alarm system through the sitemap. I’ configured persistence services over rrd4j:
OH.def=GAUGE,600,U,U,10
OH.archives=LAST,0.5,6,1440
OH.item=OH_ALARM_Zustand_Soll,OH_ALARM_Zustand_Ist,OH_PH_Garten,OH_PH_Eingang,OH_PH_Dachstuhl
Strategies {
// for rrd charts, we need a cron strategy
everyMinute : "0 * * * * ?"
}
Items {
// persist items on every change and every minute
* : strategy = everyMinute, restoreOnStartup
}
Now my problem: I set the variable to “Extern” via sitemap. The value is 2. Now, i restart my openhabian. After reloading the variables, the state changes from NULL to 2.0. Within the sitemap, the state “Extern” wouldn’t be shown, because the option 2 is mapped with Extern and not 2**.0**. I’ve tryed to add the pattern=“%d”, but the mapping still doesn’t work because the value is 2.0 again.
Any ideas to workarround this issue? One workarround would be, that i run a rule on System restarted an correct the value, but i’m looking for a better solution.