diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index fb56f77..238ece4 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -17205,8 +17205,8 @@ const CSS_STYLE = { }; const supported = { kodi: ['movie', 'episode', 'epg'], - androidtv: ['movie', 'show', 'season', 'episode', 'clip'], - plexPlayer: ['movie', 'show', 'season', 'episode', 'clip'], + androidtv: ['movie', 'show', 'season', 'episode', 'clip', 'track', 'artist', 'album'], + plexPlayer: ['movie', 'show', 'season', 'episode', 'clip', 'track', 'artist', 'album'], cast: ['movie', 'episode'] }; @@ -19858,13 +19858,27 @@ class PlayController { const entityVal = value; if (lodash.isArray(entityVal)) { for (const entity of entityVal) { - // eslint-disable-next-line no-await-in-loop - this.entityStates[entity] = await getState(this.hass, entity); + if (!lodash.isNil(this.hass.states[entity])) { + try { + // eslint-disable-next-line no-await-in-loop + this.entityStates[entity] = await getState(this.hass, entity); + } + catch (err) { + // pass + } + } } } else { - // eslint-disable-next-line no-await-in-loop - this.entityStates[entityVal] = await getState(this.hass, entityVal); + try { + if (!lodash.isNil(this.hass.states[entityVal])) { + // eslint-disable-next-line no-await-in-loop + this.entityStates[entityVal] = await getState(this.hass, entityVal); + } + } + catch (err) { + // pass + } } } return this.entityStates; diff --git a/src/const.ts b/src/const.ts index 685bd6a..a30c2d5 100644 --- a/src/const.ts +++ b/src/const.ts @@ -10,8 +10,8 @@ const CSS_STYLE: any = { const supported: any = { kodi: ['movie', 'episode', 'epg'], - androidtv: ['movie', 'show', 'season', 'episode', 'clip'], - plexPlayer: ['movie', 'show', 'season', 'episode', 'clip'], + androidtv: ['movie', 'show', 'season', 'episode', 'clip', 'track', 'artist', 'album'], + plexPlayer: ['movie', 'show', 'season', 'episode', 'clip', 'track', 'artist', 'album'], cast: ['movie', 'episode'] };