{% set _l = l if l is defined else None %} {{ _l.name }} {{ _l.userName or "" }} {% if _l.state == 4 %}ON {% elif _l.state == 2 %}OFF {% elif _l.state == 8 %}DIM {% else %}UNKNOWN{% endif %}