From c940683c1f91695677f807e39951254a3e467a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Sun, 3 Oct 2021 22:56:54 +0200 Subject: [PATCH] Fix: Kodi service always not available since 3.0.0 --- dist/plex-meets-homeassistant.js | 6 ++++++ src/modules/PlayController.ts | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 1c9ae31..009469d 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19867,6 +19867,12 @@ class PlayController { this.entityStates[entityVal] = await getState(this.hass, entityVal); } } + try { + this.entityStates['sensor.kodi_media_sensor_search'] = await getState(this.hass, 'sensor.kodi_media_sensor_search'); + } + catch (err) { + // pass + } return this.entityStates; }; this.getPlexPlayerMachineIdentifier = (entity) => { diff --git a/src/modules/PlayController.ts b/src/modules/PlayController.ts index 286353a..9451278 100644 --- a/src/modules/PlayController.ts +++ b/src/modules/PlayController.ts @@ -635,6 +635,15 @@ class PlayController { this.entityStates[entityVal] = await getState(this.hass, entityVal); } } + try { + this.entityStates['sensor.kodi_media_sensor_search'] = await getState( + this.hass, + 'sensor.kodi_media_sensor_search' + ); + } catch (err) { + // pass + } + return this.entityStates; };