Add Shelly Plus 1 (no PM) support too

This commit is contained in:
Michael Zanetti 2022-06-20 20:15:02 +02:00
parent 70e0f2c7ce
commit 4b70216f65
2 changed files with 2 additions and 2 deletions

View File

@ -267,7 +267,7 @@ void IntegrationPluginShelly::discoverThings(ThingDiscoveryInfo *info)
qCDebug(dcShelly()) << "Have entry" << entry; qCDebug(dcShelly()) << "Have entry" << entry;
QRegExp namePattern; QRegExp namePattern;
if (info->thingClassId() == shelly1ThingClassId) { if (info->thingClassId() == shelly1ThingClassId) {
namePattern = QRegExp("^shelly1-[0-9A-Z]+$"); namePattern = QRegExp("^(shelly1|ShellyPlus1)-[0-9A-Z]+$");
} else if (info->thingClassId() == shelly1pmThingClassId) { } else if (info->thingClassId() == shelly1pmThingClassId) {
namePattern = QRegExp("^(shelly1pm|ShellyPlus1PM)-[0-9A-Z]+$"); namePattern = QRegExp("^(shelly1pm|ShellyPlus1PM)-[0-9A-Z]+$");
} else if (info->thingClassId() == shelly1lThingClassId) { } else if (info->thingClassId() == shelly1lThingClassId) {

View File

@ -11,7 +11,7 @@
{ {
"id": "f810b66a-7177-4397-9771-4229abaabbb6", "id": "f810b66a-7177-4397-9771-4229abaabbb6",
"name": "shelly1", "name": "shelly1",
"displayName": "Shelly 1", "displayName": "Shelly 1/Plus 1",
"createMethods": ["discovery"], "createMethods": ["discovery"],
"interfaces": [ "gateway", "wirelessconnectable", "update" ], "interfaces": [ "gateway", "wirelessconnectable", "update" ],
"paramTypes": [ "paramTypes": [