change unit

This commit is contained in:
Simon Stürz 2016-01-18 15:46:12 +01:00 committed by Michael Zanetti
parent bdc85b1179
commit 3cd49f8930
2 changed files with 9 additions and 8 deletions

View File

@ -291,7 +291,7 @@ void DevicePluginAwattar::processPriceData(Device *device, const QVariantMap &da
minPrice = price; minPrice = price;
//qCDebug(dcAwattar) << startTime.toString() << " -> " << endTime.toString(); //qCDebug(dcAwattar) << startTime.toString() << " -> " << endTime.toString();
device->setStateValue(currentMarketPriceStateTypeId, currentPrice); device->setStateValue(currentMarketPriceStateTypeId, currentPrice / 10.0);
device->setStateValue(validUntilStateTypeId, endTime.toLocalTime().toTime_t()); device->setStateValue(validUntilStateTypeId, endTime.toLocalTime().toTime_t());
} }
} }
@ -311,9 +311,9 @@ void DevicePluginAwattar::processPriceData(Device *device, const QVariantMap &da
// qCDebug(dcAwattar) << " min :" << minPrice << "Eur/MWh"; // qCDebug(dcAwattar) << " min :" << minPrice << "Eur/MWh";
// qCDebug(dcAwattar) << " max :" << maxPrice << "Eur/MWh"; // qCDebug(dcAwattar) << " max :" << maxPrice << "Eur/MWh";
device->setStateValue(averagePriceStateTypeId, averagePrice); device->setStateValue(averagePriceStateTypeId, averagePrice / 10.0);
device->setStateValue(lowestPriceStateTypeId, minPrice); device->setStateValue(lowestPriceStateTypeId, minPrice / 10.0);
device->setStateValue(highestPriceStateTypeId, maxPrice); device->setStateValue(highestPriceStateTypeId, maxPrice / 10.0);
device->setStateValue(averageDeviationStateTypeId, deviation); device->setStateValue(averageDeviationStateTypeId, deviation);
if (fromSetup) if (fromSetup)

View File

@ -50,7 +50,7 @@
"idName": "currentMarketPrice", "idName": "currentMarketPrice",
"name": "current market price", "name": "current market price",
"type": "double", "type": "double",
"unit": "EuroPerMegaWattHour", "unit": "UnitEuroCentPerKiloWattHour",
"defaultValue": 0 "defaultValue": 0
}, },
{ {
@ -74,7 +74,7 @@
"idName": "averagePrice", "idName": "averagePrice",
"name": "average market price [± 12 h]", "name": "average market price [± 12 h]",
"type": "double", "type": "double",
"unit": "EuroPerMegaWattHour", "unit": "UnitEuroCentPerKiloWattHour",
"defaultValue": 0 "defaultValue": 0
}, },
{ {
@ -82,7 +82,7 @@
"idName": "lowestPrice", "idName": "lowestPrice",
"name": "lowest market price [± 12 h]", "name": "lowest market price [± 12 h]",
"type": "double", "type": "double",
"unit": "EuroPerMegaWattHour", "unit": "UnitEuroCentPerKiloWattHour",
"defaultValue": 0 "defaultValue": 0
}, },
{ {
@ -90,7 +90,7 @@
"idName": "highestPrice", "idName": "highestPrice",
"name": "highest market price [± 12 h]", "name": "highest market price [± 12 h]",
"type": "double", "type": "double",
"unit": "EuroPerMegaWattHour", "unit": "UnitEuroCentPerKiloWattHour",
"defaultValue": 0 "defaultValue": 0
}, },
{ {
@ -135,6 +135,7 @@
{ {
"name": "sg-mode", "name": "sg-mode",
"type": "QString", "type": "QString",
"defaultValue": "1",
"allowedValues": [ "allowedValues": [
"1", "1",
"2", "2",