From 4a0c6b2a5a8bc239afeb9e37808120c4bf4ba392 Mon Sep 17 00:00:00 2001 From: Sieren Date: Sat, 11 Sep 2021 10:08:35 +0200 Subject: [PATCH] fixup! Add Aqara TVOC Sensor Support with history --- lib/HueSensor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/HueSensor.js b/lib/HueSensor.js index 8c1e9eb..953d25d 100644 --- a/lib/HueSensor.js +++ b/lib/HueSensor.js @@ -2045,8 +2045,8 @@ HueSensor.prototype.addEntry = function (changed) { break case 'room2': { - var key = this.type.key === 'airqualityppb' ? 'voc' : this.type.key - key = this.type.key === 'temperature' ? 'temp' : key + let key = this.type.key === 'airqualityppb' ? 'voc' : + (this.type.key === 'temperature' ? 'temp' : key) this.history.entry[key] = this.hk[this.type.key] if (changed || this.type.key !== this.history.resource.type.key) { return