Fix: Entity now works

pull/16/head
Juraj Nyíri 4 years ago
parent c799dc1cc2
commit 77b609e6fd

@ -62,6 +62,7 @@ class ContentCardExample extends HTMLElement {
thumbSmall + thumbSmall +
"'); background-repeat: no-repeat; background-size: contain;"; "'); background-repeat: no-repeat; background-size: contain;";
movieElem.innerHTML = data.title; movieElem.innerHTML = data.title;
const _this = this;
movieElem.addEventListener("click", function (event) { movieElem.addEventListener("click", function (event) {
var keyParts = data.key.split("/"); var keyParts = data.key.split("/");
var movieID = keyParts[keyParts.length - 1]; var movieID = keyParts[keyParts.length - 1];
@ -71,7 +72,7 @@ class ContentCardExample extends HTMLElement {
"/com.plexapp.plugins.library/library/metadata/" + "/com.plexapp.plugins.library/library/metadata/" +
movieID + movieID +
"'"; "'";
var entity_id = this.config.entity_id; var entity_id = _this.config.entity_id;
hass.callService("androidtv", "adb_command", { hass.callService("androidtv", "adb_command", {
entity_id, entity_id,
command, command,

Loading…
Cancel
Save