Global (file wide) variables in Rules DSL

myTimeOfDayMode is defined as a string in the items file.

String myTimeOfDayMode "My Time of Day" <none>

In the log file, it does get updated

2019-05-04 10:46:21.740 [vent.ItemStateChangedEvent] - myTimeOfDayMode changed from NULL to Daytime

However, the value is not populated in the sitemap when I try to display the value

Text item=myTimeOfDayMode

Thanks @rossko57, I made that change you suggested and rule worked. However, how come I canā€™t display the value in the sitemap.

Because you havenā€™t asked for it. You need to put a format in the label, to tell the sitemap what how you want a state to display. Usually [%s] for strings.

String myTimeOfDayMode "My Time of Day [%s]" <none>
1 Like

Thank you again @rossko57, it worked!

And you seem to be doing a good job helping with this problem. Keep you the good work. :grinning:

1 Like