Update: Remove requirement of kodi entities having kodi_ in entity

pull/16/head
Juraj Nyíri 4 years ago
parent e57dd45fc2
commit 2c98e806a6

@ -112,7 +112,6 @@ Play button is only visible if all the conditions inside Availability section of
**Availability**: **Availability**:
- Provided entity ID needs to exists - Provided entity ID needs to exists
- Provided entity ID has to have 'kodi\_' in the entity_id
- Entity 'sensor.kodi_media_sensor_search' needs to exist - Entity 'sensor.kodi_media_sensor_search' needs to exist
- State of both entities cannot be 'unavailable' - State of both entities cannot be 'unavailable'
- State of kodi cannot be 'off' - State of kodi cannot be 'off'

@ -18802,8 +18802,7 @@ class PlayController {
this.hass.states['sensor.kodi_media_sensor_search'] && this.hass.states['sensor.kodi_media_sensor_search'] &&
this.hass.states['sensor.kodi_media_sensor_search'].state !== 'unavailable' && this.hass.states['sensor.kodi_media_sensor_search'].state !== 'unavailable' &&
this.hass.states[this.entity.kodi].state !== 'off' && this.hass.states[this.entity.kodi].state !== 'off' &&
this.hass.states[this.entity.kodi].state !== 'unavailable' && this.hass.states[this.entity.kodi].state !== 'unavailable');
lodash.includes(this.entity.kodi, 'kodi_'));
} }
return false; return false;
}; };

@ -132,8 +132,7 @@ class PlayController {
this.hass.states['sensor.kodi_media_sensor_search'] && this.hass.states['sensor.kodi_media_sensor_search'] &&
this.hass.states['sensor.kodi_media_sensor_search'].state !== 'unavailable' && this.hass.states['sensor.kodi_media_sensor_search'].state !== 'unavailable' &&
this.hass.states[this.entity.kodi].state !== 'off' && this.hass.states[this.entity.kodi].state !== 'off' &&
this.hass.states[this.entity.kodi].state !== 'unavailable' && this.hass.states[this.entity.kodi].state !== 'unavailable'
_.includes(this.entity.kodi, 'kodi_')
); );
} }
return false; return false;

Loading…
Cancel
Save