From 35920a206e4da3087e4ec1e64fa69ac1bf3f20e2 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 1 Apr 2020 15:56:50 +0200 Subject: [PATCH] try more --- philipshue/integrationpluginphilipshue.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/philipshue/integrationpluginphilipshue.cpp b/philipshue/integrationpluginphilipshue.cpp index c24b3347..e5b08af1 100644 --- a/philipshue/integrationpluginphilipshue.cpp +++ b/philipshue/integrationpluginphilipshue.cpp @@ -1029,48 +1029,40 @@ void IntegrationPluginPhilipsHue::onRemoteButtonEvent(int buttonCode) if (thing->thingClassId() == remoteThingClassId) { switch (buttonCode) { - case 1000: case 1002: param = Param(remotePressedEventButtonNameParamTypeId, "ON"); id = remotePressedEventTypeId; break; - case 1001: case 1003: param = Param(remoteLongPressedEventButtonNameParamTypeId, "ON"); id = remoteLongPressedEventTypeId; break; - case 2000: case 2002: param = Param(remotePressedEventButtonNameParamTypeId, "DIM UP"); id = remotePressedEventTypeId; break; - case 2001: case 2003: param = Param(remoteLongPressedEventButtonNameParamTypeId, "DIM UP"); id = remoteLongPressedEventTypeId; break; - case 3000: case 3002: param = Param(remotePressedEventButtonNameParamTypeId, "DIM DOWN"); id = remotePressedEventTypeId; break; - case 3001: case 3003: param = Param(remoteLongPressedEventButtonNameParamTypeId, "DIM DOWN"); id = remoteLongPressedEventTypeId; break; - case 4000: case 4002: param = Param(remotePressedEventButtonNameParamTypeId, "OFF"); id = remotePressedEventTypeId; break; - case 4001: case 4003: param = Param(remoteLongPressedEventButtonNameParamTypeId, "OFF"); id = remoteLongPressedEventTypeId; break; default: - qCDebug(dcPhilipsHue()) << "Unhandled button code received from Hue Remoote:" << buttonCode; + qCDebug(dcPhilipsHue()) << "Unhandled button code received from Hue Remote:" << buttonCode; return; } } else if (thing->thingClassId() == tapThingClassId) { @@ -1097,11 +1089,9 @@ void IntegrationPluginPhilipsHue::onRemoteButtonEvent(int buttonCode) } } else if (thing->thingClassId() == smartButtonThingClassId) { switch (buttonCode) { - case 1000: case 1002: id = smartButtonPressedEventTypeId; break; - case 1001: case 1003: id = smartButtonLongPressedEventTypeId; break;