Add generic Busch-Jaeger button map
@@ -117,6 +117,33 @@ static const Sensor::ButtonMap ikeaRemoteMap[] = {
{ Sensor::ModeNone, 0x00, 0x0000, 0x00, 0, 0, 0 }
};
+static const Sensor::ButtonMap bjeSwitchMap[] = {
+// mode ep cluster cmd param button name
+// 1) row left button
+ { Sensor::ModeScenes, 0x0A, 0x0006, 0x00, 0, S_BUTTON_1 + S_BUTTON_ACTION_SHORT_RELEASED, "Off" },
+ { Sensor::ModeScenes, 0x0A, 0x0008, 0x02, 1, S_BUTTON_1 + S_BUTTON_ACTION_HOLD, "Step down" },
+
+ { Sensor::ModeScenes, 0x0A, 0x0008, 0x03, 0, S_BUTTON_1 + S_BUTTON_ACTION_LONG_RELEASED, "Stop" },
+// 1) row right button
+ { Sensor::ModeScenes, 0x0A, 0x0006, 0x01, 0, S_BUTTON_2 + S_BUTTON_ACTION_SHORT_RELEASED, "On" },
+ { Sensor::ModeScenes, 0x0A, 0x0008, 0x06, 0, S_BUTTON_2 + S_BUTTON_ACTION_HOLD, "Step up (with on/off)" },
+// 2) row left button
+ { Sensor::ModeScenes, 0x0B, 0x0005, 0x05, 3, S_BUTTON_3 + S_BUTTON_ACTION_SHORT_RELEASED, "Recall scene 3" },
+// 2) row right button
+ { Sensor::ModeScenes, 0x0B, 0x0005, 0x05, 4, S_BUTTON_4 + S_BUTTON_ACTION_SHORT_RELEASED, "Recall scene 4" },
+// 3) row right button
+ { Sensor::ModeScenes, 0x0C, 0x0005, 0x05, 5, S_BUTTON_5 + S_BUTTON_ACTION_SHORT_RELEASED, "Recall scene 5" },
+// 3) row left button
+ { Sensor::ModeScenes, 0x0C, 0x0005, 0x05, 6, S_BUTTON_6 + S_BUTTON_ACTION_SHORT_RELEASED, "Recall scene 6" },
+// 4) row right button
+ { Sensor::ModeScenes, 0x0D, 0x0005, 0x05, 7, S_BUTTON_7 + S_BUTTON_ACTION_SHORT_RELEASED, "Recall scene 7" },
+// 4) row left button
+ { Sensor::ModeScenes, 0x0D, 0x0005, 0x05, 8, S_BUTTON_8 + S_BUTTON_ACTION_SHORT_RELEASED, "Recall scene 8" },
+
+ // end
+ { Sensor::ModeNone, 0x00, 0x0000, 0x00, 0, 0, 0 }
+};
+
/*! Returns a fingerprint as JSON string. */
QString SensorFingerprint::toString() const
{
@@ -544,7 +571,7 @@ const Sensor::ButtonMap *Sensor::buttonMap()
}
else if (m_manufacturer == QLatin1String("Busch-Jaeger"))
{
-
+ m_buttonMap = bjeSwitchMap;
}
else if (m_manufacturer.startsWith(QLatin1String("IKEA")))
{
