Shelly: Add second switch for the Shelly 1L
This commit is contained in:
parent
057251df08
commit
0d2de83c77
@ -1244,17 +1244,17 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info)
|
|||||||
if (myThings().filterByParentId(info->thing()->id()).isEmpty()) {
|
if (myThings().filterByParentId(info->thing()->id()).isEmpty()) {
|
||||||
// Always create the switch thing if we don't have one yet for shellies with input (1, 1pm etc)
|
// Always create the switch thing if we don't have one yet for shellies with input (1, 1pm etc)
|
||||||
if (info->thing()->thingClassId() == shelly1ThingClassId
|
if (info->thing()->thingClassId() == shelly1ThingClassId
|
||||||
|| info->thing()->thingClassId() == shelly1pmThingClassId
|
|| info->thing()->thingClassId() == shelly1pmThingClassId) {
|
||||||
|| info->thing()->thingClassId() == shelly1lThingClassId) {
|
|
||||||
ThingDescriptor switchChild(shellySwitchThingClassId, info->thing()->name() + " switch", QString(), info->thing()->id());
|
ThingDescriptor switchChild(shellySwitchThingClassId, info->thing()->name() + " switch", QString(), info->thing()->id());
|
||||||
switchChild.setParams(ParamList() << Param(shellySwitchThingChannelParamTypeId, 1));
|
switchChild.setParams(ParamList() << Param(shellySwitchThingChannelParamTypeId, 1));
|
||||||
autoChilds.append(switchChild);
|
autoChilds.append(switchChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create 2 switches for shelly 2.5
|
// Create 2 switches for some that have 2
|
||||||
if (info->thing()->thingClassId() == shelly2ThingClassId
|
if (info->thing()->thingClassId() == shelly2ThingClassId
|
||||||
|| info->thing()->thingClassId() == shelly25ThingClassId
|
|| info->thing()->thingClassId() == shelly25ThingClassId
|
||||||
|| info->thing()->thingClassId() == shellyDimmerThingClassId) {
|
|| info->thing()->thingClassId() == shellyDimmerThingClassId
|
||||||
|
|| info->thing()->thingClassId() == shelly1lThingClassId) {
|
||||||
ThingDescriptor switchChild(shellySwitchThingClassId, info->thing()->name() + " switch 1", QString(), info->thing()->id());
|
ThingDescriptor switchChild(shellySwitchThingClassId, info->thing()->name() + " switch 1", QString(), info->thing()->id());
|
||||||
switchChild.setParams(ParamList() << Param(shellySwitchThingChannelParamTypeId, 1));
|
switchChild.setParams(ParamList() << Param(shellySwitchThingChannelParamTypeId, 1));
|
||||||
autoChilds.append(switchChild);
|
autoChilds.append(switchChild);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user