diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index b1ec43c..e98ec55 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -20000,7 +20000,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { }; this.setConfig = (config) => { this.plexProtocol = 'http'; - if (config.entity.length === 0) { + if (!config.entity || config.entity.length === 0) { throw new Error('You need to define at least one entity'); } if (!config.token) { diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 10d6871..f81aacb 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -736,7 +736,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { setConfig = (config: any): void => { this.plexProtocol = 'http'; - if (config.entity.length === 0) { + if (!config.entity || config.entity.length === 0) { throw new Error('You need to define at least one entity'); } if (!config.token) {