homebridge-tasmota-control 1.4.0-beta.24 → 1.4.0-beta.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.
package/index.js CHANGED
@@ -51,6 +51,7 @@ class tasmotaPlatform {
51
51
  const passwd = deviceConfig.passwd || '';
52
52
  const refreshInterval = deviceConfig.refreshInterval * 1000 || 5000;
53
53
  const enableDebugMode = deviceConfig.enableDebugMode || false;
54
+ this.enableDebugMode = enableDebugMode;
54
55
  const disableLogDeviceInfo = deviceConfig.disableLogDeviceInfo || false;
55
56
  const disableLogInfo = deviceConfig.disableLogInfo || false;
56
57
  const disableLogSuccess = deviceConfig.disableLogSuccess || false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Tasmota Control",
3
3
  "name": "homebridge-tasmota-control",
4
- "version": "1.4.0-beta.24",
4
+ "version": "1.4.0-beta.26",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/fans.js CHANGED
@@ -360,7 +360,7 @@ class TasmotaDevice extends EventEmitter {
360
360
 
361
361
  try {
362
362
  //accessory
363
- const accessoryName = this.deviceName;
363
+ const accessoryName = this.info.deviceName;
364
364
  const accessoryUUID = AccessoryUUID.generate(this.info.serialNumber);
365
365
  const accessoryCategory = Categories.FAN;
366
366
  const accessory = new Accessory(accessoryName, accessoryUUID, accessoryCategory);
package/src/lights.js CHANGED
@@ -366,7 +366,7 @@ class TasmotaDevice extends EventEmitter {
366
366
  this.emit('devInfo', `Serialnr: ${this.info.serialNumber}`)
367
367
  this.emit('devInfo', `Firmware: ${this.info.firmwareRevision}`);
368
368
  this.emit('devInfo', `Relays: ${this.info.relaysCount}`);
369
- this.emit('devInfo', `Sensors: ${this.info.sensorsCount}`);
369
+ this.emit('devInfo', `Sensors: ${this.sensorsCount}`);
370
370
  this.emit('devInfo', `----------------------------------`);
371
371
  }
372
372
 
@@ -376,7 +376,7 @@ class TasmotaDevice extends EventEmitter {
376
376
 
377
377
  try {
378
378
  //accessory
379
- const accessoryName = this.deviceName;
379
+ const accessoryName = this.info.deviceName;
380
380
  const accessoryUUID = AccessoryUUID.generate(this.info.serialNumber);
381
381
  const accessoryCategory = Categories.LIGHTBULB
382
382
  const accessory = new Accessory(accessoryName, accessoryUUID, accessoryCategory);
@@ -400,6 +400,7 @@ class TasmotaDevice extends EventEmitter {
400
400
  const friendlyName = this.lights[i].friendlyName;
401
401
  const serviceName = this.lightsNamePrefix ? `${accessoryName} ${friendlyName}` : friendlyName;
402
402
  const lightService = accessory.addService(Service.Lightbulb, serviceName, `Light ${i}`)
403
+ lightService.setPrimaryService(true);
403
404
  lightService.addOptionalCharacteristic(Characteristic.ConfiguredName);
404
405
  lightService.setCharacteristic(Characteristic.ConfiguredName, serviceName);
405
406
  lightService.getCharacteristic(Characteristic.On)
package/src/mielhvac.js CHANGED
@@ -850,6 +850,7 @@ class TasmotaDevice extends EventEmitter {
850
850
 
851
851
  //services
852
852
  this.miElHvacService = new Service.HeaterCooler(accessoryName, `HeaterCooler ${this.info.serialNumber}`);
853
+ this.miElHvacService.setPrimaryService(true);
853
854
  this.miElHvacService.getCharacteristic(Characteristic.Active)
854
855
  .onGet(async () => {
855
856
  const state = this.mielHvac.power;
package/src/switches.js CHANGED
@@ -354,6 +354,7 @@ class TasmotaDevice extends EventEmitter {
354
354
  const serviceName = this.relaysNamePrefix ? `${accessoryName} ${friendlyName}` : friendlyName;
355
355
  const serviceSwitchOutlet = [Service.Outlet, Service.Switch][this.relaysDisplayType];
356
356
  const switchOutletService = accessory.addService(serviceSwitchOutlet, serviceName, `Power ${i}`)
357
+ switchOutletService.setPrimaryService(true);
357
358
  switchOutletService.addOptionalCharacteristic(Characteristic.ConfiguredName);
358
359
  switchOutletService.setCharacteristic(Characteristic.ConfiguredName, serviceName);
359
360
  switchOutletService.getCharacteristic(Characteristic.On)