try more
This commit is contained in:
parent
0393ad9010
commit
35920a206e
@ -1029,48 +1029,40 @@ void IntegrationPluginPhilipsHue::onRemoteButtonEvent(int buttonCode)
|
|||||||
|
|
||||||
if (thing->thingClassId() == remoteThingClassId) {
|
if (thing->thingClassId() == remoteThingClassId) {
|
||||||
switch (buttonCode) {
|
switch (buttonCode) {
|
||||||
case 1000:
|
|
||||||
case 1002:
|
case 1002:
|
||||||
param = Param(remotePressedEventButtonNameParamTypeId, "ON");
|
param = Param(remotePressedEventButtonNameParamTypeId, "ON");
|
||||||
id = remotePressedEventTypeId;
|
id = remotePressedEventTypeId;
|
||||||
break;
|
break;
|
||||||
case 1001:
|
|
||||||
case 1003:
|
case 1003:
|
||||||
param = Param(remoteLongPressedEventButtonNameParamTypeId, "ON");
|
param = Param(remoteLongPressedEventButtonNameParamTypeId, "ON");
|
||||||
id = remoteLongPressedEventTypeId;
|
id = remoteLongPressedEventTypeId;
|
||||||
break;
|
break;
|
||||||
case 2000:
|
|
||||||
case 2002:
|
case 2002:
|
||||||
param = Param(remotePressedEventButtonNameParamTypeId, "DIM UP");
|
param = Param(remotePressedEventButtonNameParamTypeId, "DIM UP");
|
||||||
id = remotePressedEventTypeId;
|
id = remotePressedEventTypeId;
|
||||||
break;
|
break;
|
||||||
case 2001:
|
|
||||||
case 2003:
|
case 2003:
|
||||||
param = Param(remoteLongPressedEventButtonNameParamTypeId, "DIM UP");
|
param = Param(remoteLongPressedEventButtonNameParamTypeId, "DIM UP");
|
||||||
id = remoteLongPressedEventTypeId;
|
id = remoteLongPressedEventTypeId;
|
||||||
break;
|
break;
|
||||||
case 3000:
|
|
||||||
case 3002:
|
case 3002:
|
||||||
param = Param(remotePressedEventButtonNameParamTypeId, "DIM DOWN");
|
param = Param(remotePressedEventButtonNameParamTypeId, "DIM DOWN");
|
||||||
id = remotePressedEventTypeId;
|
id = remotePressedEventTypeId;
|
||||||
break;
|
break;
|
||||||
case 3001:
|
|
||||||
case 3003:
|
case 3003:
|
||||||
param = Param(remoteLongPressedEventButtonNameParamTypeId, "DIM DOWN");
|
param = Param(remoteLongPressedEventButtonNameParamTypeId, "DIM DOWN");
|
||||||
id = remoteLongPressedEventTypeId;
|
id = remoteLongPressedEventTypeId;
|
||||||
break;
|
break;
|
||||||
case 4000:
|
|
||||||
case 4002:
|
case 4002:
|
||||||
param = Param(remotePressedEventButtonNameParamTypeId, "OFF");
|
param = Param(remotePressedEventButtonNameParamTypeId, "OFF");
|
||||||
id = remotePressedEventTypeId;
|
id = remotePressedEventTypeId;
|
||||||
break;
|
break;
|
||||||
case 4001:
|
|
||||||
case 4003:
|
case 4003:
|
||||||
param = Param(remoteLongPressedEventButtonNameParamTypeId, "OFF");
|
param = Param(remoteLongPressedEventButtonNameParamTypeId, "OFF");
|
||||||
id = remoteLongPressedEventTypeId;
|
id = remoteLongPressedEventTypeId;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qCDebug(dcPhilipsHue()) << "Unhandled button code received from Hue Remoote:" << buttonCode;
|
qCDebug(dcPhilipsHue()) << "Unhandled button code received from Hue Remote:" << buttonCode;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (thing->thingClassId() == tapThingClassId) {
|
} else if (thing->thingClassId() == tapThingClassId) {
|
||||||
@ -1097,11 +1089,9 @@ void IntegrationPluginPhilipsHue::onRemoteButtonEvent(int buttonCode)
|
|||||||
}
|
}
|
||||||
} else if (thing->thingClassId() == smartButtonThingClassId) {
|
} else if (thing->thingClassId() == smartButtonThingClassId) {
|
||||||
switch (buttonCode) {
|
switch (buttonCode) {
|
||||||
case 1000:
|
|
||||||
case 1002:
|
case 1002:
|
||||||
id = smartButtonPressedEventTypeId;
|
id = smartButtonPressedEventTypeId;
|
||||||
break;
|
break;
|
||||||
case 1001:
|
|
||||||
case 1003:
|
case 1003:
|
||||||
id = smartButtonLongPressedEventTypeId;
|
id = smartButtonLongPressedEventTypeId;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user