mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 20:36:35 +00:00
Show error if no entity specified for history card (#7752)
This commit is contained in:
parent
fd5b125c2d
commit
aad6492a6a
@ -73,8 +73,8 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
|
||||
public setConfig(config: HistoryGraphCardConfig): void {
|
||||
if (!config.entities) {
|
||||
throw new Error("Entities must be defined");
|
||||
if (!config.entities.length) {
|
||||
throw new Error("Entities must be specified");
|
||||
}
|
||||
|
||||
if (config.entities && !Array.isArray(config.entities)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user