From 2c98e806a6037a37198c5d1b871b97152e2d3fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Sat, 8 May 2021 12:57:03 +0200 Subject: [PATCH] Update: Remove requirement of kodi entities having kodi_ in entity --- README.md | 1 - dist/plex-meets-homeassistant.js | 3 +-- src/modules/PlayController.ts | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5114d7f..7a7623b 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,6 @@ Play button is only visible if all the conditions inside Availability section of **Availability**: - Provided entity ID needs to exists -- Provided entity ID has to have 'kodi\_' in the entity_id - Entity 'sensor.kodi_media_sensor_search' needs to exist - State of both entities cannot be 'unavailable' - State of kodi cannot be 'off' diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 0515ff0..b1ec43c 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -18802,8 +18802,7 @@ class PlayController { this.hass.states['sensor.kodi_media_sensor_search'] && this.hass.states['sensor.kodi_media_sensor_search'].state !== 'unavailable' && this.hass.states[this.entity.kodi].state !== 'off' && - this.hass.states[this.entity.kodi].state !== 'unavailable' && - lodash.includes(this.entity.kodi, 'kodi_')); + this.hass.states[this.entity.kodi].state !== 'unavailable'); } return false; }; diff --git a/src/modules/PlayController.ts b/src/modules/PlayController.ts index a0e243b..e281d71 100644 --- a/src/modules/PlayController.ts +++ b/src/modules/PlayController.ts @@ -132,8 +132,7 @@ class PlayController { this.hass.states['sensor.kodi_media_sensor_search'] && this.hass.states['sensor.kodi_media_sensor_search'].state !== 'unavailable' && this.hass.states[this.entity.kodi].state !== 'off' && - this.hass.states[this.entity.kodi].state !== 'unavailable' && - _.includes(this.entity.kodi, 'kodi_') + this.hass.states[this.entity.kodi].state !== 'unavailable' ); } return false;