From 72417e488b531a7c63ba7cb5cb4c2ca8062e6e0f Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Fri, 21 Jun 2019 16:38:53 +0200 Subject: [PATCH] PhilipsHue: Drop deprecated old-style Hue Remote button events --- philipshue/devicepluginphilipshue.cpp | 8 ------ philipshue/devicepluginphilipshue.json | 40 -------------------------- 2 files changed, 48 deletions(-) diff --git a/philipshue/devicepluginphilipshue.cpp b/philipshue/devicepluginphilipshue.cpp index 212e1222..af132796 100644 --- a/philipshue/devicepluginphilipshue.cpp +++ b/philipshue/devicepluginphilipshue.cpp @@ -706,44 +706,36 @@ void DevicePluginPhilipsHue::onRemoteButtonEvent(int buttonCode) EventTypeId id; Param param; - // TODO: Legacy events should be removed eventually switch (buttonCode) { case HueRemote::OnPressed: param = Param(remotePressedEventButtonNameParamTypeId, "ON"); id = remotePressedEventTypeId; break; case HueRemote::OnLongPressed: - emitEvent(Event(remoteOnLongPressedEventTypeId, m_remotes.value(remote)->id())); param = Param(remoteLongPressedEventButtonNameParamTypeId, "ON"); id = remoteLongPressedEventTypeId; break; case HueRemote::DimUpPressed: - emitEvent(Event(remoteDimUpPressedEventTypeId, m_remotes.value(remote)->id())); param = Param(remotePressedEventButtonNameParamTypeId, "DIM UP"); id = remotePressedEventTypeId; break; case HueRemote::DimUpLongPressed: - emitEvent(Event(remoteDimUpLongPressedEventTypeId, m_remotes.value(remote)->id())); param = Param(remoteLongPressedEventButtonNameParamTypeId, "DIM UP"); id = remoteLongPressedEventTypeId; break; case HueRemote::DimDownPressed: - emitEvent(Event(remoteDimDownPressedEventTypeId, m_remotes.value(remote)->id())); param = Param(remotePressedEventButtonNameParamTypeId, "DIM DOWN"); id = remotePressedEventTypeId; break; case HueRemote::DimDownLongPressed: - emitEvent(Event(remoteDimDownLongPressedEventTypeId, m_remotes.value(remote)->id())); param = Param(remoteLongPressedEventButtonNameParamTypeId, "DIM DOWN"); id = remoteLongPressedEventTypeId; break; case HueRemote::OffPressed: - emitEvent(Event(remoteOffPressedEventTypeId, m_remotes.value(remote)->id())); param = Param(remotePressedEventButtonNameParamTypeId, "OFF"); id = remotePressedEventTypeId; break; case HueRemote::OffLongPressed: - emitEvent(Event(remoteOffLongPressedEventTypeId, m_remotes.value(remote)->id())); param = Param(remoteLongPressedEventButtonNameParamTypeId, "OFF"); id = remoteLongPressedEventTypeId; break; diff --git a/philipshue/devicepluginphilipshue.json b/philipshue/devicepluginphilipshue.json index 5cfe5bdd..b5a5d12c 100644 --- a/philipshue/devicepluginphilipshue.json +++ b/philipshue/devicepluginphilipshue.json @@ -514,46 +514,6 @@ } ], "eventTypes": [ - { - "id": "de769db0-4c31-46cf-9760-dbc6f9209c26", - "name": "onPressed", - "displayName": "on pressed" - }, - { - "id": "6c5e596b-7c15-40bb-af9d-c778a6b0f30e", - "name": "onLongPressed", - "displayName": "on long pressed" - }, - { - "id": "8e3d6a62-6a19-4e9a-a25b-e1da2e56ede9", - "name": "dimUpPressed", - "displayName": "dim up pressed" - }, - { - "id": "53d3c9af-3e25-4116-b22b-38d897bc20aa", - "name": "dimUpLongPressed", - "displayName": "dim up long pressed" - }, - { - "id": "efd8b972-9a37-43f2-b9bc-f9dfe144a96d", - "name": "dimDownPressed", - "displayName": "dim down pressed" - }, - { - "id": "1986d4c6-4c9f-4e43-ba70-0ff06c6f177b", - "name": "dimDownLongPressed", - "displayName": "dim down long pressed" - }, - { - "id": "7c2a58f1-137c-4bf3-8f9e-453dff020487", - "name": "offPressed", - "displayName": "off pressed" - }, - { - "id": "d69306eb-ea52-4841-9e26-89c69e9cf6fc", - "name": "offLongPressed", - "displayName": "off long pressed" - }, { "id": "8da28cf1-2457-451e-953e-2685f8daeda8", "name": "pressed",