From e5ef78b0107f5d0672327eb2a5d8f24d512bf7ee Mon Sep 17 00:00:00 2001 From: Northern Man <19808920+NorthernMan54@users.noreply.github.com> Date: Wed, 15 Feb 2023 16:27:58 -0500 Subject: [PATCH] Corrected device_class for DT24 Bluetooth Voltmeter (#1459) Found during Power Meter testing that the DT24 voltage and current discovery values were being created as power and not voltage and current. --- main/ZgatewayBT.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/ZgatewayBT.ino b/main/ZgatewayBT.ino index 8b30c5d..21d4c5c 100644 --- a/main/ZgatewayBT.ino +++ b/main/ZgatewayBT.ino @@ -453,8 +453,8 @@ void DT24Discovery(const char* mac, const char* sensorModel_id) { # define DT24parametersCount 6 Log.trace(F("DT24Discovery" CR)); const char* DT24sensor[DT24parametersCount][9] = { - {"sensor", "volt", mac, "power", jsonVolt, "", "", "V", stateClassMeasurement}, - {"sensor", "amp", mac, "power", jsonCurrent, "", "", "A", stateClassMeasurement}, + {"sensor", "volt", mac, "voltage", jsonVolt, "", "", "V", stateClassMeasurement}, + {"sensor", "amp", mac, "current", jsonCurrent, "", "", "A", stateClassMeasurement}, {"sensor", "watt", mac, "power", jsonPower, "", "", "W", stateClassMeasurement}, {"sensor", "watt-hour", mac, "power", jsonEnergy, "", "", "kWh", stateClassMeasurement}, {"sensor", "price", mac, "", jsonMsg, "", "", "", stateClassNone},