homebridge-tasmota-control 1.3.4 → 1.3.5

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.3.4",
4
+ "version": "1.3.5",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -45,9 +45,9 @@ class TasmotaDevice extends EventEmitter {
45
45
  for (const preset of presets) {
46
46
  const displayType = preset.displayType ?? 0;
47
47
  if (displayType === 0) {
48
- return;
48
+ continue;
49
+ };
49
50
 
50
- }
51
51
  const presetyServiceType = ['', Service.Outlet, Service.Switch, Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][displayType];
52
52
  const presetCharacteristicType = ['', Characteristic.On, Characteristic.On, Characteristic.MotionDetected, Characteristic.OccupancyDetected, Characteristic.ContactSensorState][displayType];
53
53
  preset.serviceType = presetyServiceType;
@@ -65,9 +65,8 @@ class TasmotaDevice extends EventEmitter {
65
65
  for (const button of buttons) {
66
66
  const displayType = button.displayType ?? 0;
67
67
  if (displayType === 0) {
68
- return;
69
-
70
- }
68
+ continue;
69
+ };
71
70
 
72
71
  const buttonServiceType = ['', Service.Outlet, Service.Switch][displayType];
73
72
  const buttonCharacteristicType = ['', Characteristic.On, Characteristic.On][displayType];
@@ -86,9 +85,9 @@ class TasmotaDevice extends EventEmitter {
86
85
  for (const sensor of sensors) {
87
86
  const displayType = sensor.displayType ?? 0;
88
87
  if (displayType === 0) {
89
- return;
88
+ continue;
89
+ };
90
90
 
91
- }
92
91
  const sensorServiceType = ['', Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][displayType];
93
92
  const sensorCharacteristicType = ['', Characteristic.MotionDetected, Characteristic.OccupancyDetected, Characteristic.ContactSensorState][displayType];
94
93
  sensor.serviceType = sensorServiceType;