diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 40d563d..04ce79b 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19982,7 +19982,9 @@ class PlayController { } } try { - this.entityStates['sensor.kodi_media_sensor_search'] = await getState(this.hass, 'sensor.kodi_media_sensor_search'); + if (this.hass.states['sensor.kodi_media_sensor_search']) { + this.entityStates['sensor.kodi_media_sensor_search'] = await getState(this.hass, 'sensor.kodi_media_sensor_search'); + } } catch (err) { // pass diff --git a/src/modules/PlayController.ts b/src/modules/PlayController.ts index 0e9f73f..88018aa 100644 --- a/src/modules/PlayController.ts +++ b/src/modules/PlayController.ts @@ -697,10 +697,12 @@ class PlayController { } } try { - this.entityStates['sensor.kodi_media_sensor_search'] = await getState( - this.hass, - 'sensor.kodi_media_sensor_search' - ); + if (this.hass.states['sensor.kodi_media_sensor_search']) { + this.entityStates['sensor.kodi_media_sensor_search'] = await getState( + this.hass, + 'sensor.kodi_media_sensor_search' + ); + } } catch (err) { // pass }