From 4b70216f652ac9ef38ef4c6c3b43233df09237ce Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 20 Jun 2022 20:15:02 +0200 Subject: [PATCH] Add Shelly Plus 1 (no PM) support too --- shelly/integrationpluginshelly.cpp | 2 +- shelly/integrationpluginshelly.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shelly/integrationpluginshelly.cpp b/shelly/integrationpluginshelly.cpp index 90097682..cdb5cdab 100644 --- a/shelly/integrationpluginshelly.cpp +++ b/shelly/integrationpluginshelly.cpp @@ -267,7 +267,7 @@ void IntegrationPluginShelly::discoverThings(ThingDiscoveryInfo *info) qCDebug(dcShelly()) << "Have entry" << entry; QRegExp namePattern; if (info->thingClassId() == shelly1ThingClassId) { - namePattern = QRegExp("^shelly1-[0-9A-Z]+$"); + namePattern = QRegExp("^(shelly1|ShellyPlus1)-[0-9A-Z]+$"); } else if (info->thingClassId() == shelly1pmThingClassId) { namePattern = QRegExp("^(shelly1pm|ShellyPlus1PM)-[0-9A-Z]+$"); } else if (info->thingClassId() == shelly1lThingClassId) { diff --git a/shelly/integrationpluginshelly.json b/shelly/integrationpluginshelly.json index 352552d9..72dbb0af 100644 --- a/shelly/integrationpluginshelly.json +++ b/shelly/integrationpluginshelly.json @@ -11,7 +11,7 @@ { "id": "f810b66a-7177-4397-9771-4229abaabbb6", "name": "shelly1", - "displayName": "Shelly 1", + "displayName": "Shelly 1/Plus 1", "createMethods": ["discovery"], "interfaces": [ "gateway", "wirelessconnectable", "update" ], "paramTypes": [