Fix storage interface and improve inverter name after setup

master
Simon Stürz 2021-12-10 13:12:01 +01:00
parent 81c33edaed
commit f710ce0b44
2 changed files with 5 additions and 5 deletions

View File

@ -71,9 +71,9 @@ void IntegrationPluginFronius::discoverThings(ThingDiscoveryInfo *info)
QString title;
if (networkDeviceInfo.hostName().isEmpty()) {
title += networkDeviceInfo.address().toString();
title += "Fronius Solar";
} else {
title += networkDeviceInfo.address().toString() + " (" + networkDeviceInfo.hostName() + ")";
title += "Fronius Solar (" + networkDeviceInfo.hostName() + ")";
}
QString description;
@ -411,8 +411,8 @@ void IntegrationPluginFronius::searchNewThings(FroniusLogger *logger)
foreach (const QString &inverterId, inverterMap.keys()) {
//check if thing already connected to logger
if (!thingExists(inverterThingIdParamTypeId, inverterId)) {
QString thingName = loggerThing->name() + " Inverter " + inverterId;
ThingDescriptor descriptor(inverterThingClassId, thingName, "Fronius Solar Inverter", loggerThing->id());
QString thingDescription = loggerThing->name();
ThingDescriptor descriptor(inverterThingClassId, "Fronius Solar Inverter", thingDescription, loggerThing->id());
ParamList params;
params.append(Param(inverterThingIdParamTypeId, inverterId));
descriptor.setParams(params);

View File

@ -384,7 +384,7 @@
"name": "storage",
"displayName": "Fronius solar storage",
"createMethods": ["auto"],
"interfaces": [ "battery", "connectable" ],
"interfaces": [ "energystorage", "connectable" ],
"paramTypes": [
{
"id": "49087f31-abf5-4bb8-946b-a3626ee80566",