Following is part of my item definition:
/* *** NTP binding demo item *** */
DateTime Date "Datum und Uhrzeit: [%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM]" <calendar> { channel="ntp:ntp:local:dateTime" } /* T für Zeit */
DateTime Weekday "[%1$tA]" <calendar> { channel="ntp:ntp:local:dateTime" } /* Wochentag */
My sitemap is using:
Text item=Date icon="calendar" // Anzeige Datum und Kalender
Text item=Weekday
The result is as expected:
first line: weekday, date and time is shown
second line: only the weekday is shown
Now I want use that information in a rule like e.g.
if (Weekday.state == "Sonntag") {
sendTelegram("bot2", "yes") }
else
sendTelegram("bot2", "no")
this is part of a rule just to test if I can access to the weekday. Whatever I ask the literal is evaluataed to “no”.
If I send the content of weekday
sendTelegram("bot2", ". tag:"+Weekday.state)
I get the information:
“.tag:2020-07-05T12:31:…”
How can I check on the current weekday in order to let parts of a rule run dependent on the day?