I’m Vidar from Germany and totally new to OpenHAB and home automation.
I tried the last 5 days(no joke) to assign text to a String and display it in the BasicUI. I do not want to use visibility (which did not work either), because I want to use the string in several UIs.
I created a Rule to assign the String depending on the power my dishwasher uses:
rule "Spuelmaschine_Betriebszustand"
when
Item Kueche_Spuelmaschine_Leistung received update
then
if (Kueche_Spuelmaschine_Leistung.state == 0 ) {
Kueche_Spuelmaschine_Betrieb.state.toString("Aus")
}
else if (Kueche_Spuelmaschine_Leistung.state >=4) {
Kueche_Spuelmaschine_Betrieb.state.toString("Läuft")
}
else if (Kueche_Spuelmaschine_Leistung.state > 0 && Kueche_Spuelmaschin>
Kueche_Spuelmaschine_Betrieb.state.toString("Fertig")
}
I also tried the postUpdate option.
the line to display it in the Sitemap:
Text item=Kueche_Spuelmaschine_Betrieb
Could someone please tell me, what I’m doing wrong?
Well, either something is not updating properly when you’re saving your configuration files, or something else is changing the state of Kueche_Spuelmaschine_Betrieb (an old rule?).
That just means that Kueche_Spuelmaschine_Betrieb does not have a value assigned to it yet. It is null. Has your rule actually run yet with the sendCommand or postUpdate?