Skip to content

Commit

Permalink
Fix #44: Infinite loop calling to PLEX_URL/api/states/sensor.kodi_med…
Browse files Browse the repository at this point in the history
…ia_sensor_search and getting 404 not found response
  • Loading branch information
JurajNyiri committed Oct 13, 2021
1 parent 27eb76c commit a23435d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion dist/plex-meets-homeassistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -19982,7 +19982,9 @@ class PlayController {
}
}
try {
this.entityStates['sensor.kodi_media_sensor_search'] = await getState(this.hass, 'sensor.kodi_media_sensor_search');
if (this.hass.states['sensor.kodi_media_sensor_search']) {
this.entityStates['sensor.kodi_media_sensor_search'] = await getState(this.hass, 'sensor.kodi_media_sensor_search');
}
}
catch (err) {
// pass
Expand Down
10 changes: 6 additions & 4 deletions src/modules/PlayController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,12 @@ class PlayController {
}
}
try {
this.entityStates['sensor.kodi_media_sensor_search'] = await getState(
this.hass,
'sensor.kodi_media_sensor_search'
);
if (this.hass.states['sensor.kodi_media_sensor_search']) {
this.entityStates['sensor.kodi_media_sensor_search'] = await getState(
this.hass,
'sensor.kodi_media_sensor_search'
);
}
} catch (err) {
// pass
}
Expand Down

0 comments on commit a23435d

Please sign in to comment.