Read-only Switch doesn't work

As I read it is possible to display a switch item as text in sitemaps, but it doesn’t work for me. My aim is to display the read-only state of an calculated variable on my sitemap.

I created a very simple test, but it doesn’t work. Do you have any idea why?

my items file:

Switch test_switch_item "Test Switch Item"

my sitemap file:

sitemap test label="Teszt"
                Text item=test_switch_item
                Switch item=test_switch_item

The result is the following:
As I expected the Text field should display On or Off value in my sitemap.

You missing the format in your item definition.

Switch test_switch_item "Test Switch Item [%s]"

The format is in the squared brackets. In this case it is a string format.

1 Like

Thank you, now it works great. :wink:

You’re welcome :stuck_out_tongue_winking_eye: