Skip to content

Commit

Permalink
Better empty entities check
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Mar 21, 2024
1 parent 4c980a2 commit a51ba55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/panels/history/ha-panel-history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit a51ba55

Please sign in to comment.