homebridge-tasmota-control 1.6.1-beta.10 → 1.6.1-beta.12
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/sensors.js +4 -3
package/package.json
CHANGED
package/src/sensors.js
CHANGED
|
@@ -139,9 +139,10 @@ class Sensors extends EventEmitter {
|
|
|
139
139
|
//update characteristics
|
|
140
140
|
if (this.sensorServices?.[i]) {
|
|
141
141
|
const update = (service, subtype, charName, value) => {
|
|
142
|
-
const serviceExist = service
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
const serviceExist = service?.subtype === subtype;
|
|
143
|
+
const characteristic = service?.Characteristic?.[charName];
|
|
144
|
+
if (serviceExist && characteristic) {
|
|
145
|
+
service.updateCharacteristic(characteristic, value);
|
|
145
146
|
}
|
|
146
147
|
};
|
|
147
148
|
|