mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-08 09:56:36 +00:00
media_player: Don't switch to first input source, if we actually know better. (#433)
* doubleCheck: Don't switch to zero, if we actually know better. https://github.com/home-assistant/home-assistant/issues/9517 * Fix linting * Reverting changes, introducing sourceIndexOld
This commit is contained in:
parent
ff1b667546
commit
b1c83a8491
@ -333,13 +333,14 @@ Polymer({
|
||||
this.callService('media_next_track');
|
||||
},
|
||||
|
||||
handleSourceChanged: function (sourceIndex) {
|
||||
handleSourceChanged: function (sourceIndex, sourceIndexOld) {
|
||||
var sourceInput;
|
||||
// Selected Option will transition to '' before transitioning to new value
|
||||
if (!this.stateObj
|
||||
|| this.stateObj.attributes.source_list === undefined
|
||||
|| sourceIndex < 0
|
||||
|| sourceIndex >= this.stateObj.attributes.source_list.length
|
||||
|| sourceIndexOld === undefined
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user