Skip to content

Commit

Permalink
Allow population of the entire entities list using templates
Browse files Browse the repository at this point in the history
Fixes iantrich#93, Closes iantrich#119, Closes iantrich#147
(This eliminates the need for iantrich#119 and iantrich#147)
  • Loading branch information
PaulSD committed Dec 23, 2024
1 parent a365e8e commit e24c748
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/config-template-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ export class ConfigTemplateCard extends LitElement {
const oldHass = changedProps.get('hass') as HomeAssistant | undefined;

if (oldHass) {
for (const entity of this._config.entities) {
const evaluatedTemplate = this._evaluateTemplate(entity);
if (Boolean(this.hass && oldHass.states[evaluatedTemplate] !== this.hass.states[evaluatedTemplate])) {
for (const entity of this._evaluateConfig(this._config.entities)) {
if (Boolean(this.hass && oldHass.states[entity] !== this.hass.states[entity])) {
return true;
}
}
Expand Down

0 comments on commit e24c748

Please sign in to comment.