Add #66: Accept vlc_telnet entity as a valid target entity

vlc_telnet
Juraj Nyíri 3 years ago
parent 6f82472971
commit c0adda57f6

@ -300,7 +300,8 @@ class PlexMeetsHomeAssistant extends HTMLElement {
_.startsWith(entityString, 'kodi | ') || _.startsWith(entityString, 'kodi | ') ||
_.startsWith(entityString, 'cast | ') || _.startsWith(entityString, 'cast | ') ||
_.startsWith(entityString, 'input_select | ') || _.startsWith(entityString, 'input_select | ') ||
_.startsWith(entityString, 'input_text | ') _.startsWith(entityString, 'input_text | ') ||
_.startsWith(entityString, 'vlc_telnet | ')
) { ) {
// eslint-disable-next-line prefer-destructuring // eslint-disable-next-line prefer-destructuring
realEntityString = entityString.split(' | ')[1]; realEntityString = entityString.split(' | ')[1];
@ -351,8 +352,15 @@ class PlexMeetsHomeAssistant extends HTMLElement {
} }
entityObj.inputText.push(entityInRegister.entity_id); entityObj.inputText.push(entityInRegister.entity_id);
break; 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: default:
// pass console.error(`Entity ${entityInRegister.entity_id} is not supported.`);
} }
} }
}); });

Loading…
Cancel
Save