SolarLog: Fix currentPower state and disable caching for volatile states

master
Michael Zanetti 2022-02-08 14:43:32 +01:00
parent eff66ea2f4
commit 620634fedb
2 changed files with 11 additions and 6 deletions

View File

@ -125,7 +125,7 @@ void IntegrationPluginSolarLog::getData(Thing *thing)
QVariantMap map = data.toVariant().toMap().value("801").toMap().value("170").toMap();
thing->setStateValue(solarlogLastupdateStateTypeId, map.value(QString::number(JsonObjectNumbers::LastUpdateTime)));
thing->setStateValue(solarlogTotalPowerEventTypeId, (map.value(QString::number(JsonObjectNumbers::Pac)).toDouble()/1000.00));
thing->setStateValue(solarlogCurrentPowerStateTypeId, (map.value(QString::number(JsonObjectNumbers::Pac)).toDouble()/1000.00));
thing->setStateValue(solarlogPdcStateTypeId, (map.value(QString::number(JsonObjectNumbers::Pdc)).toDouble()/1000.00));
thing->setStateValue(solarlogUacStateTypeId, map.value(QString::number(JsonObjectNumbers::Uac)));
thing->setStateValue(solarlogDcVoltageStateTypeId, map.value(QString::number(JsonObjectNumbers::DCVoltage)));

View File

@ -49,7 +49,8 @@
"displayNameEvent": "Power AC changed",
"type": "double",
"unit": "Watt",
"defaultValue": 0
"defaultValue": 0,
"cached": false
},
{
"id": "e4183a70-c848-447a-962a-f19dc5974140",
@ -58,7 +59,8 @@
"displayNameEvent": "Power DC changed",
"type": "double",
"unit": "Watt",
"defaultValue": 0
"defaultValue": 0,
"cached": false
},
{
"id": "7dc46b2e-5fba-4cc6-a159-09472cdfac62",
@ -67,7 +69,8 @@
"displayNameEvent": "AC voltage changed",
"type": "double",
"unit": "Volt",
"defaultValue": 0
"defaultValue": 0,
"cached": false
},
{
"id": "bb891a05-59d8-4a3b-a0ea-b63af58558f7",
@ -76,7 +79,8 @@
"displayNameEvent": "DC voltage changed",
"type": "double",
"unit": "Volt",
"defaultValue": 0
"defaultValue": 0,
"cached": false
},
{
"id": "53ed041a-e3c3-4ae5-9a79-1cd7ad82e9a8",
@ -130,7 +134,8 @@
"displayNameEvent": "Current total power consumption changed",
"type": "double",
"unit": "Watt",
"defaultValue": 0
"defaultValue": 0,
"cached": false
},
{
"id": "40ff1d14-a5d2-4fdb-919c-58dfbcdca123",