DSL : comparing strings using two variables

In addition to Rich:

Add a log statement, so that you can see the content of your variable.

What you maybe really want (and your current script seems to be only a workaround) is to know if the item representing current day is switched on our off?
To get an item (and it’s state) based on a variable/string, maybe have a look here: