homebridge-tasmota-control 1.0.0 → 1.0.2
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 +1 -1
- package/src/tasmotadevice.js +7 -7
package/package.json
CHANGED
package/src/tasmotadevice.js
CHANGED
|
@@ -40,9 +40,9 @@ class TasmotaDevice extends EventEmitter {
|
|
|
40
40
|
const remoteTemperatureSensorPasswd = remoteTemperatureSensor.passwd;
|
|
41
41
|
|
|
42
42
|
//presets
|
|
43
|
-
|
|
43
|
+
const presets = miElHvac.presets || [];
|
|
44
44
|
this.presetsConfigured = [];
|
|
45
|
-
for (const preset of
|
|
45
|
+
for (const preset of presets) {
|
|
46
46
|
const presetName = preset.name ?? false;
|
|
47
47
|
const presetDisplayType = preset.displayType ?? 0;
|
|
48
48
|
const presetNamePrefix = preset.namePrefix ?? false;
|
|
@@ -62,9 +62,9 @@ class TasmotaDevice extends EventEmitter {
|
|
|
62
62
|
this.presetsConfiguredCount = this.presetsConfigured.length || 0;
|
|
63
63
|
|
|
64
64
|
//buttons
|
|
65
|
-
|
|
65
|
+
const buttons = miElHvac.buttons || [];
|
|
66
66
|
this.buttonsConfigured = [];
|
|
67
|
-
for (const button of
|
|
67
|
+
for (const button of buttons) {
|
|
68
68
|
const buttonName = button.name ?? false;
|
|
69
69
|
const buttonMode = button.mode ?? -1;
|
|
70
70
|
const buttonDisplayType = button.displayType ?? 0;
|
|
@@ -85,9 +85,9 @@ class TasmotaDevice extends EventEmitter {
|
|
|
85
85
|
this.buttonsConfiguredCount = this.buttonsConfigured.length || 0;
|
|
86
86
|
|
|
87
87
|
//sensors
|
|
88
|
-
|
|
88
|
+
const sensors = miElHvac.sensors || [];
|
|
89
89
|
this.sensorsConfigured = [];
|
|
90
|
-
for (const sensor of
|
|
90
|
+
for (const sensor of sensors) {
|
|
91
91
|
const sensorName = sensor.name ?? false;
|
|
92
92
|
const sensorMode = sensor.mode ?? -1;
|
|
93
93
|
const sensorDisplayType = sensor.displayType ?? 0;
|
|
@@ -105,7 +105,7 @@ class TasmotaDevice extends EventEmitter {
|
|
|
105
105
|
const log = sensorDisplayType === 0 ? false : this.emit('warn', `Sensor Name: ${sensorName ? sensorName : 'Missing'}, Mode: ${sensorMode ? sensorMode : 'Missing'}.`);
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
this.
|
|
108
|
+
this.sensorsConfiguredCount = this.sensorsConfigured.length || 0;
|
|
109
109
|
|
|
110
110
|
//frost protect
|
|
111
111
|
const frostProtect = miElHvac.frostProtect ?? {};
|