Check for value in supertable
The Super Table field value is a query, so the .all() needs to be called on the field itself (not on lightswitch). But looping over queries is in itself deprecated in Craft, so you should set it to a variable first, and then loop over that.

In any case, the .all() will return all rows of your Super Table field, each of which contains your lightswitch field (even if there is only one row).

If you know there is only one row, perhaps something like this would work, but I haven't tested it:

{% if craft.products.supertable.one().lightswitch == 1 %}


I would anyways recommend performing the query first, then use the result to loop or get your field.