PhilipsHue: Drop deprecated old-style Hue Remote button events

master
Michael Zanetti 2019-06-21 16:38:53 +02:00
parent 05fee5bc95
commit 72417e488b
2 changed files with 0 additions and 48 deletions

View File

@ -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;

View File

@ -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",