From c0adda57f68a3b4424a380790c8817f981e8e51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Tue, 4 Jan 2022 17:32:24 +0100 Subject: [PATCH] Add #66: Accept vlc_telnet entity as a valid target entity --- src/plex-meets-homeassistant.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index c1abe84..36fb76f 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -300,7 +300,8 @@ class PlexMeetsHomeAssistant extends HTMLElement { _.startsWith(entityString, 'kodi | ') || _.startsWith(entityString, 'cast | ') || _.startsWith(entityString, 'input_select | ') || - _.startsWith(entityString, 'input_text | ') + _.startsWith(entityString, 'input_text | ') || + _.startsWith(entityString, 'vlc_telnet | ') ) { // eslint-disable-next-line prefer-destructuring realEntityString = entityString.split(' | ')[1]; @@ -351,8 +352,15 @@ class PlexMeetsHomeAssistant extends HTMLElement { } entityObj.inputText.push(entityInRegister.entity_id); break; + case 'vlc_telnet': + if (_.isNil(entityObj.inputText)) { + // eslint-disable-next-line no-param-reassign + entityObj.inputText = []; + } + entityObj.inputText.push(entityInRegister.entity_id); + break; default: - // pass + console.error(`Entity ${entityInRegister.entity_id} is not supported.`); } } });