As I do not often change things in OpenHab I wondered where I can find the syntax of how to include variables in Item Text. I normally copy from another user and test, like the example below. But I d rather would like to know when to use %s and other variables like those below and to understand.
Thank you for the halp.
Yes, it is this part. So I do not understand the formating options. Some of the contributor use them to add values to a label of an item. I do not understand the semantics. I carried together from several blog entries that:
%s is string
%d is Integer
%f ist floating point %.0f = no decimals, %.1f is one number after the decimal point etc.
My q for you: Is there a general description of all these formatting options? Or are some specific to some interfaces, bindings etc?
Example: When I added the sunrise from Astro binding to the sitemap it showed something like this: 2020-06-06 5:36. I didn’t whant to display the date, only the time. Finally I found a contribution with the format [%1$tH:%1$tM] that did what I liked to have. But honestly I had no clue what I was doing. What is the %1 for the $ and so on.