Checklist:
Release with the issue:
2.0.0-b1
Last working release (if known):
1.3.6
1.3.7-beta.1
Browser and Operating System:
Chrome 145.0.7632.160
Win10x64
Description of problem:
This code used to work before 2.0.0-b1:
type: custom:config-template-card
variables:
LIGHTS: |-
Object.keys(states).filter(
k => k.startsWith('light')
)
entities: ${LIGHTS}
card:
type: grid
square: false
columns: 3
title: CTC
cards: |-
${
let cards = [];
LIGHTS.map(entity =>
cards = cards.concat(
{
'type': 'tile',
'entity': entity,
'tap_action': {'action': 'toggle'}
}
)
);
cards;
}
Now it shows nothing, only errors in a console.
Javascript errors shown in the web inspector (if applicable):
Uncaught (in promise) SyntaxError: Unexpected identifier 'cards'
at new Function (<anonymous>)
at h (config-template-card.js?hacstag=1721775432001:39:4725)
at $t._evaluateTemplate (config-template-card.js?hacstag=1721775432001:39:5255)
at config-template-card.js?hacstag=1721775432001:39:4260
at Array.forEach (<anonymous>)
at $t._evaluateConfig (config-template-card.js?hacstag=1721775432001:39:4075)
at $t.render (config-template-card.js?hacstag=1721775432001:39:2733)
at $t.update (config-template-card.js?hacstag=1721775432001:23:236)
at $t.performUpdate (config-template-card.js?hacstag=1721775432001:12:4877)
at $t.scheduleUpdate (config-template-card.js?hacstag=1721775432001:12:4397)
Additional information:
Checklist:
Release with the issue:
2.0.0-b1
Last working release (if known):
1.3.6
1.3.7-beta.1
Browser and Operating System:
Chrome 145.0.7632.160
Win10x64
Description of problem:
This code used to work before 2.0.0-b1:
Now it shows nothing, only errors in a console.
Javascript errors shown in the web inspector (if applicable):
Additional information: