homebridge-tasmota-control 1.0.2 → 1.0.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Tasmota Control",
3
3
  "name": "homebridge-tasmota-control",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -70,7 +70,7 @@ class TasmotaDevice extends EventEmitter {
70
70
  const buttonDisplayType = button.displayType ?? 0;
71
71
  const buttonNamePrefix = button.namePrefix ?? false;
72
72
  if (buttonName && buttonMode >= 0 && buttonDisplayType > 0) {
73
- const buttonServiceType = ['', Service.Outlet, Service.Switch, Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][buttonDisplayType];
73
+ const buttonServiceType = ['', Service.Outlet, Service.Switch][buttonDisplayType];
74
74
  const buttonCharacteristicType = ['', Characteristic.On, Characteristic.On][buttonDisplayType];
75
75
  button.namePrefix = buttonNamePrefix;
76
76
  button.serviceType = buttonServiceType;
@@ -93,7 +93,7 @@ class TasmotaDevice extends EventEmitter {
93
93
  const sensorDisplayType = sensor.displayType ?? 0;
94
94
  const sensorNamePrefix = sensor.namePrefix ?? false;
95
95
  if (sensorName && sensorMode >= 0 && sensorDisplayType > 0) {
96
- const sensorServiceType = ['', Service.Outlet, Service.Switch, Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][sensorDisplayType];
96
+ const sensorServiceType = ['', Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][sensorDisplayType];
97
97
  const sensorCharacteristicType = ['', Characteristic.MotionDetected, Characteristic.OccupancyDetected, Characteristic.ContactSensorState][sensorDisplayType];
98
98
  sensor.namePrefix = sensorNamePrefix;
99
99
  sensor.serviceType = sensorServiceType;
@@ -1635,7 +1635,7 @@ class TasmotaDevice extends EventEmitter {
1635
1635
  const serviceName = sensorNamePrefix ? `${accessoryName} ${sensorName}` : sensorName;
1636
1636
  const serviceType = sensor.serviceType;
1637
1637
  const characteristicType = sensor.characteristicType;
1638
- const sensorService = new serviceType(serviceName, `Button ${i}`);
1638
+ const sensorService = new serviceType(serviceName, `Sensor ${i}`);
1639
1639
  sensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
1640
1640
  sensorService.setCharacteristic(Characteristic.ConfiguredName, serviceName);
1641
1641
  sensorService.getCharacteristic(characteristicType)