Use variable in if/else to check attribute

Good point. Speaking of data_template, check out this unforseen side-effect of making data the equivalent of data_template.

The goal is to publish a payload containing a template, but you don’t want the template to be evaluated simply published literally. It becomes a bit more complicated now that data works like data_template.

Sorry for hijacking the thread! (See you in the other thread if you want to continue the conversation)