homebridge-yoto 0.0.23 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -173,6 +173,7 @@ export class YotoPlayerAccessory {
173
173
  .setCharacteristic(this.platform.Characteristic.Model, this.device.deviceType || DEFAULT_MODEL)
174
174
  .setCharacteristic(this.platform.Characteristic.SerialNumber, this.device.deviceId)
175
175
  .setCharacteristic(this.platform.Characteristic.FirmwareRevision, this.device.releaseChannel || '1.0.0')
176
+ .setCharacteristic(this.platform.Characteristic.Name, this.accessory.displayName)
176
177
  }
177
178
  }
178
179
 
@@ -315,7 +316,7 @@ export class YotoPlayerAccessory {
315
316
  setupAdvancedControlSwitches () {
316
317
  // Bluetooth enabled switch
317
318
  this.bluetoothSwitch =
318
- this.accessory.getService(`${this.accessory.displayName} Bluetooth`) ||
319
+ this.accessory.getServiceById(this.platform.Service.Switch, 'bluetooth') ||
319
320
  this.accessory.addService(this.platform.Service.Switch, `${this.accessory.displayName} Bluetooth`, 'bluetooth')
320
321
 
321
322
  this.bluetoothSwitch.setCharacteristic(this.platform.Characteristic.Name, `${this.accessory.displayName} Bluetooth`)
@@ -327,7 +328,7 @@ export class YotoPlayerAccessory {
327
328
 
328
329
  // Repeat all switch
329
330
  this.repeatSwitch =
330
- this.accessory.getService(`${this.accessory.displayName} Repeat`) ||
331
+ this.accessory.getServiceById(this.platform.Service.Switch, 'repeat') ||
331
332
  this.accessory.addService(this.platform.Service.Switch, `${this.accessory.displayName} Repeat`, 'repeat')
332
333
 
333
334
  this.repeatSwitch.setCharacteristic(this.platform.Characteristic.Name, `${this.accessory.displayName} Repeat`)
@@ -339,7 +340,7 @@ export class YotoPlayerAccessory {
339
340
 
340
341
  // Bluetooth headphones switch
341
342
  this.btHeadphonesSwitch =
342
- this.accessory.getService(`${this.accessory.displayName} BT Headphones`) ||
343
+ this.accessory.getServiceById(this.platform.Service.Switch, 'bt-headphones') ||
343
344
  this.accessory.addService(this.platform.Service.Switch, `${this.accessory.displayName} BT Headphones`, 'bt-headphones')
344
345
 
345
346
  this.btHeadphonesSwitch.setCharacteristic(this.platform.Characteristic.Name, `${this.accessory.displayName} BT Headphones`)
@@ -380,7 +381,7 @@ export class YotoPlayerAccessory {
380
381
  setupVolumeLimitsServices () {
381
382
  // Day volume limit
382
383
  this.dayVolumeLimitService =
383
- this.accessory.getService(`${this.accessory.displayName} Day Volume Limit`) ||
384
+ this.accessory.getServiceById(this.platform.Service.Lightbulb, 'day-volume-limit') ||
384
385
  this.accessory.addService(this.platform.Service.Lightbulb, `${this.accessory.displayName} Day Volume Limit`, 'day-volume-limit')
385
386
 
386
387
  this.dayVolumeLimitService.setCharacteristic(this.platform.Characteristic.Name, `${this.accessory.displayName} Day Volume Limit`)
@@ -398,7 +399,7 @@ export class YotoPlayerAccessory {
398
399
 
399
400
  // Night volume limit
400
401
  this.nightVolumeLimitService =
401
- this.accessory.getService(`${this.accessory.displayName} Night Volume Limit`) ||
402
+ this.accessory.getServiceById(this.platform.Service.Lightbulb, 'night-volume-limit') ||
402
403
  this.accessory.addService(this.platform.Service.Lightbulb, `${this.accessory.displayName} Night Volume Limit`, 'night-volume-limit')
403
404
 
404
405
  this.nightVolumeLimitService.setCharacteristic(this.platform.Characteristic.Name, `${this.accessory.displayName} Night Volume Limit`)
@@ -420,7 +421,7 @@ export class YotoPlayerAccessory {
420
421
  */
421
422
  setupAmbientLightService () {
422
423
  this.ambientLightService =
423
- this.accessory.getService(`${this.accessory.displayName} Ambient Light`) ||
424
+ this.accessory.getServiceById(this.platform.Service.Lightbulb, 'ambient-light') ||
424
425
  this.accessory.addService(this.platform.Service.Lightbulb, `${this.accessory.displayName} Ambient Light`, 'ambient-light')
425
426
 
426
427
  this.ambientLightService.setCharacteristic(this.platform.Characteristic.Name, `${this.accessory.displayName} Ambient Light`)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-yoto",
3
3
  "description": "Control your Yoto players through Apple HomeKit with real-time MQTT updates",
4
- "version": "0.0.23",
4
+ "version": "0.0.26",
5
5
  "author": "Bret Comnes <bcomnes@gmail.com> (https://bret.io)",
6
6
  "bugs": {
7
7
  "url": "https://github.com/bcomnes/homebridge-yoto/issues"