diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts index 6d11865f63..33e78e7a9c 100644 --- a/src/panels/config/devices/ha-config-device-page.ts +++ b/src/panels/config/devices/ha-config-device-page.ts @@ -448,30 +448,18 @@ export class HaConfigDevicePage extends LitElement { ${this._related.automation.map((automation) => { const entityState = this.hass.states[automation]; return entityState - ? html` - - - ${computeStateName(entityState)} - - - - ` + + ${computeStateName(entityState)} + + + ` : nothing; })} @@ -536,34 +524,30 @@ export class HaConfigDevicePage extends LitElement {
${this._related.scene.map((scene) => { const entityState = this.hass.states[scene]; - return entityState + return entityState && entityState.attributes.id ? html` + + + ${computeStateName(entityState)} + + + + ` + : html` - - - ${computeStateName(entityState)} - - - + + ${computeStateName(entityState)} + + - ` - : nothing; + `; })}
`