File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,10 @@ class SpotifyInstance extends InstanceBase<DeviceConfig> implements SpotifyInsta
313
313
variableId : 'deviceName' ,
314
314
name : 'Current device name' ,
315
315
} ,
316
+ {
317
+ variableId : 'deviceId' ,
318
+ name : 'Current device id' ,
319
+ } ,
316
320
]
317
321
318
322
this . setVariableDefinitions ( variables )
@@ -495,6 +499,10 @@ class SpotifyInstance extends InstanceBase<DeviceConfig> implements SpotifyInsta
495
499
invalidatedFeedbacks . push ( FeedbackId . ActiveDevice )
496
500
variableUpdates [ 'deviceName' ] = newState ?. deviceInfo ?. name ?? '-'
497
501
}
502
+ if ( forceUpdate || oldState ?. deviceInfo ?. id !== newState ?. deviceInfo ?. id ) {
503
+ invalidatedFeedbacks . push ( FeedbackId . ActiveDevice )
504
+ variableUpdates [ 'deviceId' ] = newState ?. deviceInfo ?. id ?? '-'
505
+ }
498
506
499
507
// Inform companion of the state changes
500
508
if ( invalidatedFeedbacks . length > 0 ) this . checkFeedbacks ( ...invalidatedFeedbacks )
You can’t perform that action at this time.
0 commit comments