Potential Syntax Problems

Yes, but can't find how to tag the post as 'solution', sorry.

Thanks for the help on using sets and the hint with testing ...

Are these icons visible at the bottom of my post above?

image


No, otherwise it would be easy ...

Tried in Firefox and Edge ... missing here, maybe no rights?

Ok, this statement is something like iif in other languages and the [ ] notation is defining a list of something, is this correct?

{% set devices_to_check = [devices_to_check] if (not devices_to_check|typeof == 'list') else devices_to_check %}

Create a list with one element, if the content of the variable isn't a list or use the list, if there is one already.

Thanks for pointing at that.

(( Ha, hidden behind the '...'. ))