Keba: Fix eventTypes -> stateTypes typo and uncache volatile states

This commit is contained in:
Michael Zanetti 2022-02-08 15:05:10 +01:00 committed by Simon Stürz
parent fc523cc7e6
commit 7bf00706ef
2 changed files with 32 additions and 19 deletions

View File

@ -585,12 +585,12 @@ void IntegrationPluginKeba::onReportThreeReceived(const KeContact::ReportThree &
qCDebug(dcKeba()) << " - Uptime" << reportThree.seconds / 60 << "[min]"; qCDebug(dcKeba()) << " - Uptime" << reportThree.seconds / 60 << "[min]";
if (reportThree.serialNumber == thing->paramValue(wallboxThingSerialNumberParamTypeId).toString()) { if (reportThree.serialNumber == thing->paramValue(wallboxThingSerialNumberParamTypeId).toString()) {
thing->setStateValue(wallboxCurrentPhaseAEventTypeId, reportThree.currentPhase1); thing->setStateValue(wallboxCurrentPhaseAStateTypeId, reportThree.currentPhase1);
thing->setStateValue(wallboxCurrentPhaseBEventTypeId, reportThree.currentPhase2); thing->setStateValue(wallboxCurrentPhaseBStateTypeId, reportThree.currentPhase2);
thing->setStateValue(wallboxCurrentPhaseCEventTypeId, reportThree.currentPhase3); thing->setStateValue(wallboxCurrentPhaseCStateTypeId, reportThree.currentPhase3);
thing->setStateValue(wallboxVoltagePhaseAEventTypeId, reportThree.voltagePhase1); thing->setStateValue(wallboxVoltagePhaseAStateTypeId, reportThree.voltagePhase1);
thing->setStateValue(wallboxVoltagePhaseBEventTypeId, reportThree.voltagePhase2); thing->setStateValue(wallboxVoltagePhaseBStateTypeId, reportThree.voltagePhase2);
thing->setStateValue(wallboxVoltagePhaseCEventTypeId, reportThree.voltagePhase3); thing->setStateValue(wallboxVoltagePhaseCStateTypeId, reportThree.voltagePhase3);
thing->setStateValue(wallboxCurrentPowerStateTypeId, reportThree.power); thing->setStateValue(wallboxCurrentPowerStateTypeId, reportThree.power);
thing->setStateValue(wallboxSessionEnergyStateTypeId, reportThree.energySession); thing->setStateValue(wallboxSessionEnergyStateTypeId, reportThree.energySession);
thing->setStateValue(wallboxPowerFactorStateTypeId, reportThree.powerFactor); thing->setStateValue(wallboxPowerFactorStateTypeId, reportThree.powerFactor);

View File

@ -164,7 +164,8 @@
"displayNameEvent": "Voltage phase A changed", "displayNameEvent": "Voltage phase A changed",
"type": "int", "type": "int",
"unit": "Volt", "unit": "Volt",
"defaultValue": 0 "defaultValue": 0,
"cached": false
}, },
{ {
"id": "c8344ca5-21ac-4cd1-8f4b-e5ed202c5862", "id": "c8344ca5-21ac-4cd1-8f4b-e5ed202c5862",
@ -173,7 +174,8 @@
"displayNameEvent": "Voltage phase B changed", "displayNameEvent": "Voltage phase B changed",
"type": "int", "type": "int",
"unit": "Volt", "unit": "Volt",
"defaultValue": 0 "defaultValue": 0,
"cached": false
}, },
{ {
"id": "5f01e86c-0943-4849-a01a-db441916ebd5", "id": "5f01e86c-0943-4849-a01a-db441916ebd5",
@ -182,7 +184,8 @@
"displayNameEvent": "Voltage phase C changed", "displayNameEvent": "Voltage phase C changed",
"type": "int", "type": "int",
"unit": "Volt", "unit": "Volt",
"defaultValue": 0 "defaultValue": 0,
"cached": false
}, },
{ {
"id": "31ec17b0-11e3-4332-92b0-fea821cf024f", "id": "31ec17b0-11e3-4332-92b0-fea821cf024f",
@ -192,7 +195,8 @@
"type": "double", "type": "double",
"unit": "Ampere", "unit": "Ampere",
"defaultValue": 0.00, "defaultValue": 0.00,
"suggestLogging": true "suggestLogging": true,
"cached": false
}, },
{ {
"id": "cdc7e10a-0d0a-4e93-ad2c-d34ffca45c97", "id": "cdc7e10a-0d0a-4e93-ad2c-d34ffca45c97",
@ -202,7 +206,8 @@
"type": "double", "type": "double",
"unit": "Ampere", "unit": "Ampere",
"defaultValue": 0.00, "defaultValue": 0.00,
"suggestLogging": true "suggestLogging": true,
"cached": false
}, },
{ {
"id": "da838dc8-85f0-4e55-b4b5-cb93a43b373d", "id": "da838dc8-85f0-4e55-b4b5-cb93a43b373d",
@ -212,7 +217,8 @@
"type": "double", "type": "double",
"unit": "Ampere", "unit": "Ampere",
"defaultValue": 0.00, "defaultValue": 0.00,
"suggestLogging": true "suggestLogging": true,
"cached": false
}, },
{ {
"id": "7af9e93b-099d-4d9d-a480-9c0f66aecd8b", "id": "7af9e93b-099d-4d9d-a480-9c0f66aecd8b",
@ -222,7 +228,8 @@
"type": "double", "type": "double",
"unit": "Watt", "unit": "Watt",
"defaultValue": 0.00, "defaultValue": 0.00,
"suggestLogging": true "suggestLogging": true,
"cached": false
}, },
{ {
"id": "889c3c9a-96b4-4408-bd9a-d79e36ed9296", "id": "889c3c9a-96b4-4408-bd9a-d79e36ed9296",
@ -231,7 +238,8 @@
"displayNameEvent": "Power factor changed", "displayNameEvent": "Power factor changed",
"type": "double", "type": "double",
"unit": "Percentage", "unit": "Percentage",
"defaultValue": 0.00 "defaultValue": 0.00,
"cached": false
}, },
{ {
"id": "1d30ce60-2ea0-450f-817e-5c88f59ebfbf", "id": "1d30ce60-2ea0-450f-817e-5c88f59ebfbf",
@ -248,7 +256,8 @@
"displayNameEvent": "Session time changed", "displayNameEvent": "Session time changed",
"type": "int", "type": "int",
"unit": "Minutes", "unit": "Minutes",
"defaultValue": 0 "defaultValue": 0,
"cached": false
}, },
{ {
"id": "8e277efe-21ef-4536-bfc0-901b32d44d7c", "id": "8e277efe-21ef-4536-bfc0-901b32d44d7c",
@ -258,7 +267,8 @@
"type": "double", "type": "double",
"unit": "KiloWattHour", "unit": "KiloWattHour",
"defaultValue": 0, "defaultValue": 0,
"suggestLogging": true "suggestLogging": true,
"cached": false
}, },
{ {
"id": "41e179b3-29a2-43ec-b537-023a527081e8", "id": "41e179b3-29a2-43ec-b537-023a527081e8",
@ -295,7 +305,8 @@
"displayNameEvent": "Uptime changed", "displayNameEvent": "Uptime changed",
"type": "int", "type": "int",
"unit": "Minutes", "unit": "Minutes",
"defaultValue": 0 "defaultValue": 0,
"cached": false
}, },
{ {
"id": "b44bc948-1234-4f87-9a22-bfb6de09df4d", "id": "b44bc948-1234-4f87-9a22-bfb6de09df4d",
@ -303,7 +314,8 @@
"displayName": "Error 1", "displayName": "Error 1",
"displayNameEvent": "Error 1 changed", "displayNameEvent": "Error 1 changed",
"type": "int", "type": "int",
"defaultValue": 0 "defaultValue": 0,
"cached": false
}, },
{ {
"id": "afca201a-5213-43fe-bfec-cae6ce7509d2", "id": "afca201a-5213-43fe-bfec-cae6ce7509d2",
@ -311,7 +323,8 @@
"displayName": "Error 2", "displayName": "Error 2",
"displayNameEvent": "Error 2 changed", "displayNameEvent": "Error 2 changed",
"type": "int", "type": "int",
"defaultValue": 0 "defaultValue": 0,
"cached": false
}, },
{ {
"id": "f1758c5c-2c02-41cb-93ec-b778a3c78d28", "id": "f1758c5c-2c02-41cb-93ec-b778a3c78d28",