Summary ItemError, A != java.lang.String

  • Platform information: Raspberry PI 4
    • Hardware: 4 CPU, x86Architecture/ 4GB RAM/storage 256GB SSD
    • OS: Openhabian
    • Java Runtime Environment: zulu 11.0.16
    • openHAB version: 3.4.0

Hello community,
First of all I would like to thank everyone, I have been able to solve OpenHAB problems for a few years by simply searching in the community discussion. Thank you for all the hours you sacrifice to keep the project running, stay smart :-).

I just have a small problem. I have created some summary items for my calendar that also work. I’ve searched the community and also found similar problems, but no solution that worked for me. (if I missed the topic, sorry, where can I find it?)

The only problem is that I regularly get the following error message, but I don’t understand why:


[ERROR] [.internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘Kalender_OH3-3’ failed: A != java.lang.String in Kalender_OH3


.rule:
rule “Muellkalender Zusammenfassung”
when
Item Muell_Ergebnistitel received update or
Item Muell_Ergebnistitel_2 received update or
Item Muell_Ergebnisstart received update

then
var Muell_ergebnistitel = (Muell_Ergebnistitel.state.toString)//(Muell_Ergebnistitel.state.toString)
var Muell_ergebnistitel_2 = (Muell_Ergebnistitel_2.state.toString) // (Muell_Ergebnistitel_2.state.toString)
val Muell_ergebnisstart = (Muell_Ergebnisstart.state.format(“%1$tA, %1$td.%1$tm.%1$tY”))

var String Muellkalender_Summary_Output = String::format("%s, %s und %s", Muell_ergebnisstart, Muell_ergebnistitel, Muell_ergebnistitel_2)
Muellkalender_Summary.postUpdate(Muellkalender_Summary_Output)

end


.items:
// Abfall Items durch den Filter
DateTime Muell_Ergebnisstart “Ergebnisstart Müll Date [%1$tA, %1$tB %1$td, %1$tY]” (gCalendar) { channel=“icalendar:eventfilter:6a836eca8b:e88dfcb30d:result_0#begin”}
DateTime Muell_Ergebnisende “Ergebnisende Müll [%s]” (gCalendar) { channel=“icalendar:eventfilter:6a836eca8b:e88dfcb30d:result_0#end”}
String Muell_Ergebnistitel “Ergebnistitel Müll [%s]” (gCalendar) { channel=“icalendar:eventfilter:6a836eca8b:e88dfcb30d:result_0#title”}
String Muell_Ergebnistitel_2 “Ergebnistitel Müll [%s]” (gCalendar) { channel=“icalendar:eventfilter:6a836eca8b:e88dfcb30d:result_1#title”}
String Muellkalender_Summary “Müllkalender Zusammenfassung [%s]” (gCalendar)


The purpose of the rule should be that the date and the event name appear clearly together in the sitemap.
The scary thing is that the rules still work, but since I’m not a programmer I don’t understand it. Can you help me?
Greetings Steffen