diff --git a/debian/guh-plugins.install b/debian/guh-plugins.install index 06d9c959..48751053 100644 --- a/debian/guh-plugins.install +++ b/debian/guh-plugins.install @@ -19,3 +19,4 @@ usr/lib/guh/plugins/libguh_deviceplugintune.so usr/lib/guh/plugins/libguh_devicepluginudpcommander.so usr/lib/guh/plugins/libguh_devicepluginkodi.so usr/lib/guh/plugins/libguh_devicepluginelgato.so +usr/lib/guh/plugins/libguh_devicepluginawattar.so diff --git a/plugins/deviceplugins/awattar/devicepluginawattar.cpp b/plugins/deviceplugins/awattar/devicepluginawattar.cpp index 98ac248f..0a073001 100644 --- a/plugins/deviceplugins/awattar/devicepluginawattar.cpp +++ b/plugins/deviceplugins/awattar/devicepluginawattar.cpp @@ -29,7 +29,7 @@ In order to use this plugin you need to enter the access token from your energy provider. You can find more information about you accesstoken \l{https://www.awattar.com/api-unser-datenfeed}{here}. - The data will be fetched every hour. The API allows you a maximum of 100 calls per day. + The data will be updated every hour. The API allows a maximum of 100 calls per day. \chapter Plugin properties Following JSON file contains the definition and the description of all available \l{DeviceClass}{DeviceClasses} @@ -146,6 +146,7 @@ void DevicePluginAwattar::processData(Device *device, const QVariantMap &data, c qCDebug(dcAwattar) << "end :" << endTime.toString(); qCDebug(dcAwattar) << "price :" << marketPrice << elementMap.value("unit").toString(); device->setStateValue(currentMarketPriceStateTypeId, marketPrice); + device->setStateValue(validUntilStateTypeId, endTime.toLocalTime().toTime_t()); } } diff --git a/plugins/deviceplugins/awattar/devicepluginawattar.json b/plugins/deviceplugins/awattar/devicepluginawattar.json index 50d59f4f..369e2c61 100644 --- a/plugins/deviceplugins/awattar/devicepluginawattar.json +++ b/plugins/deviceplugins/awattar/devicepluginawattar.json @@ -33,6 +33,14 @@ "type": "double", "unit": "EuroPerMegaWattHour", "defaultValue": 0 + }, + { + "id": "d5a8a176-aca0-45b1-b043-95c43750f383", + "idName": "validUntil", + "name": "valid until", + "unit": "UnixTime", + "type": "int", + "defaultValue": 0 } ] }