Better empty entities check

This commit is contained in:
Paulus Schoutsen 2024-02-28 22:43:35 -05:00
parent 4c980a27f4
commit a51ba55069
1 changed files with 1 additions and 1 deletions

View File

@ -781,7 +781,7 @@ class HaPanelHistory extends SubscribeMixin(LitElement) {
private _suggestCard() {
const entities = this._getEntityIds();
if (!entities || !this._mungedStateHistory) {
if (entities.length === 0 || !this._mungedStateHistory) {
showAlertDialog(this, {
title: this.hass.localize("ui.panel.history.add_card_error"),
text: this.hass.localize("ui.panel.history.error_no_data"),