Skip to content

Commit

Permalink
Merge pull request #4 from poblouin/fix-0.1.3
Browse files Browse the repository at this point in the history
Fix two devices with the same UUID
  • Loading branch information
poblouin authored Feb 9, 2022
2 parents 094d5c4 + b4b3176 commit b661ea6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @poblouin
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge Spotify Speaker",
"name": "@poblouin/homebridge-spotify-speaker",
"version": "0.1.2",
"version": "0.1.3",
"description": "Homebridge plugin that creates a speaker that plays a specific Spotify playlist",
"license": "MIT",
"author": "Pierre-Olivier Blouin <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class HomebridgeSpotifySpeakerPlatform implements DynamicPlatformPlugin {
continue;
}

const uuid = this.api.hap.uuid.generate(device.spotifyDeviceId);
const uuid = this.api.hap.uuid.generate(`${device.deviceName}-${device.spotifyDeviceId}`);
const existingAccessory = this.accessories.find((accessory) => accessory.UUID === uuid);

if (existingAccessory) {
Expand Down

0 comments on commit b661ea6

Please sign in to comment.