Fix storage interface and improve inverter name after setup

This commit is contained in:
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; QString title;
if (networkDeviceInfo.hostName().isEmpty()) { if (networkDeviceInfo.hostName().isEmpty()) {
title += networkDeviceInfo.address().toString(); title += "Fronius Solar";
} else { } else {
title += networkDeviceInfo.address().toString() + " (" + networkDeviceInfo.hostName() + ")"; title += "Fronius Solar (" + networkDeviceInfo.hostName() + ")";
} }
QString description; QString description;
@ -411,8 +411,8 @@ void IntegrationPluginFronius::searchNewThings(FroniusLogger *logger)
foreach (const QString &inverterId, inverterMap.keys()) { foreach (const QString &inverterId, inverterMap.keys()) {
//check if thing already connected to logger //check if thing already connected to logger
if (!thingExists(inverterThingIdParamTypeId, inverterId)) { if (!thingExists(inverterThingIdParamTypeId, inverterId)) {
QString thingName = loggerThing->name() + " Inverter " + inverterId; QString thingDescription = loggerThing->name();
ThingDescriptor descriptor(inverterThingClassId, thingName, "Fronius Solar Inverter", loggerThing->id()); ThingDescriptor descriptor(inverterThingClassId, "Fronius Solar Inverter", thingDescription, loggerThing->id());
ParamList params; ParamList params;
params.append(Param(inverterThingIdParamTypeId, inverterId)); params.append(Param(inverterThingIdParamTypeId, inverterId));
descriptor.setParams(params); descriptor.setParams(params);

View File

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