Merge PR #515: Shelly: Add support for the shelly vintage bulb
This commit is contained in:
commit
a3a601b76d
@ -16,6 +16,7 @@ The currently supported devices are:
|
||||
* Shelly H+T
|
||||
* Shelly i3
|
||||
* Shelly Motion
|
||||
* Shelly Vintage
|
||||
|
||||
## Requirements
|
||||
Shelly devices communicate with via MQTT. This means, in order to add Shelly devices to nymea, the nymea instance is required
|
||||
|
||||
@ -458,7 +458,7 @@ void IntegrationPluginShelly::discoverThings(ThingDiscoveryInfo *info)
|
||||
} else if (info->thingClassId() == shellyRgbw2ThingClassId) {
|
||||
namePattern = QRegExp("^shellyrgbw2-[0-9A-Z]+$");
|
||||
} else if (info->thingClassId() == shellyDimmerThingClassId) {
|
||||
namePattern = QRegExp("^shellydimmer(2)?-[0-9A-Z]+$");
|
||||
namePattern = QRegExp("^(shellydimmer(2)?|ShellyVintage)-[0-9A-Z]+$");
|
||||
} else if (info->thingClassId() == shelly2ThingClassId) {
|
||||
namePattern = QRegExp("^shellyswitch-[0-9A-Z]+$");
|
||||
} else if (info->thingClassId() == shelly25ThingClassId) {
|
||||
@ -1302,7 +1302,7 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info)
|
||||
// Create 2 switches for some that have 2
|
||||
if (info->thing()->thingClassId() == shelly2ThingClassId
|
||||
|| info->thing()->thingClassId() == shelly25ThingClassId
|
||||
|| info->thing()->thingClassId() == shellyDimmerThingClassId
|
||||
|| (info->thing()->thingClassId() == shellyDimmerThingClassId && info->thing()->paramValue(shellyDimmerThingIdParamTypeId).toString().startsWith("shellydimmer")) // Don't create chids for shelly vintage
|
||||
|| info->thing()->thingClassId() == shelly1lThingClassId) {
|
||||
ThingDescriptor switchChild(shellySwitchThingClassId, info->thing()->name() + " switch 1", QString(), info->thing()->id());
|
||||
switchChild.setParams(ParamList() << Param(shellySwitchThingChannelParamTypeId, 1));
|
||||
|
||||
@ -835,7 +835,7 @@
|
||||
{
|
||||
"id": "3a1d6fc1-c623-4b45-9c81-1573fcc15f99",
|
||||
"name": "shellyDimmer",
|
||||
"displayName": "Shelly Dimmer / Dimmer 2",
|
||||
"displayName": "Shelly Dimmer (2) / Vintage",
|
||||
"createMethods": ["discovery"],
|
||||
"interfaces": ["dimmablelight", "wirelessconnectable", "update"],
|
||||
"paramTypes": [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user