diff --git a/homeassistant/components/deconz/device_trigger.py b/homeassistant/components/deconz/device_trigger.py index a146552f14e..b0486a99dc8 100644 --- a/homeassistant/components/deconz/device_trigger.py +++ b/homeassistant/components/deconz/device_trigger.py @@ -300,6 +300,50 @@ AQARA_SQUARE_SWITCH_WXKG11LM_2016 = { (CONF_QUADRUPLE_PRESS, CONF_TURN_ON): {CONF_EVENT: 1006}, } +AQARA_OPPLE_2_BUTTONS_MODEL = "lumi.remote.b286opcn01" +AQARA_OPPLE_2_BUTTONS = { + (CONF_LONG_PRESS, CONF_TURN_OFF): {CONF_EVENT: 1001}, + (CONF_SHORT_RELEASE, CONF_TURN_OFF): {CONF_EVENT: 1002}, + (CONF_LONG_RELEASE, CONF_TURN_OFF): {CONF_EVENT: 1003}, + (CONF_DOUBLE_PRESS, CONF_TURN_OFF): {CONF_EVENT: 1004}, + (CONF_TRIPLE_PRESS, CONF_TURN_OFF): {CONF_EVENT: 1005}, + (CONF_LONG_PRESS, CONF_TURN_ON): {CONF_EVENT: 2001}, + (CONF_SHORT_RELEASE, CONF_TURN_ON): {CONF_EVENT: 2002}, + (CONF_LONG_RELEASE, CONF_TURN_ON): {CONF_EVENT: 2003}, + (CONF_DOUBLE_PRESS, CONF_TURN_ON): {CONF_EVENT: 2004}, + (CONF_TRIPLE_PRESS, CONF_TURN_ON): {CONF_EVENT: 2005}, +} + +AQARA_OPPLE_4_BUTTONS_MODEL = "lumi.remote.b486opcn01" +AQARA_OPPLE_4_BUTTONS = { + **AQARA_OPPLE_2_BUTTONS, + (CONF_LONG_PRESS, CONF_DIM_DOWN): {CONF_EVENT: 3001}, + (CONF_SHORT_RELEASE, CONF_DIM_DOWN): {CONF_EVENT: 3002}, + (CONF_LONG_RELEASE, CONF_DIM_DOWN): {CONF_EVENT: 3003}, + (CONF_DOUBLE_PRESS, CONF_DIM_DOWN): {CONF_EVENT: 3004}, + (CONF_TRIPLE_PRESS, CONF_DIM_DOWN): {CONF_EVENT: 3005}, + (CONF_LONG_PRESS, CONF_DIM_UP): {CONF_EVENT: 4001}, + (CONF_SHORT_RELEASE, CONF_DIM_UP): {CONF_EVENT: 4002}, + (CONF_LONG_RELEASE, CONF_DIM_UP): {CONF_EVENT: 4003}, + (CONF_DOUBLE_PRESS, CONF_DIM_UP): {CONF_EVENT: 4004}, + (CONF_TRIPLE_PRESS, CONF_DIM_UP): {CONF_EVENT: 4005}, +} + +AQARA_OPPLE_6_BUTTONS_MODEL = "lumi.remote.b686opcn01" +AQARA_OPPLE_6_BUTTONS = { + **AQARA_OPPLE_4_BUTTONS, + (CONF_LONG_PRESS, CONF_DIM_DOWN): {CONF_EVENT: 5001}, + (CONF_SHORT_RELEASE, CONF_LEFT): {CONF_EVENT: 5002}, + (CONF_LONG_RELEASE, CONF_LEFT): {CONF_EVENT: 5003}, + (CONF_DOUBLE_PRESS, CONF_LEFT): {CONF_EVENT: 5004}, + (CONF_TRIPLE_PRESS, CONF_LEFT): {CONF_EVENT: 5005}, + (CONF_LONG_PRESS, CONF_RIGHT): {CONF_EVENT: 6001}, + (CONF_SHORT_RELEASE, CONF_RIGHT): {CONF_EVENT: 6002}, + (CONF_LONG_RELEASE, CONF_RIGHT): {CONF_EVENT: 6003}, + (CONF_DOUBLE_PRESS, CONF_RIGHT): {CONF_EVENT: 6004}, + (CONF_TRIPLE_PRESS, CONF_RIGHT): {CONF_EVENT: 6005}, +} + REMOTES = { HUE_DIMMER_REMOTE_MODEL_GEN1: HUE_DIMMER_REMOTE, HUE_DIMMER_REMOTE_MODEL_GEN2: HUE_DIMMER_REMOTE, @@ -319,6 +363,9 @@ REMOTES = { AQARA_ROUND_SWITCH_MODEL: AQARA_ROUND_SWITCH, AQARA_SQUARE_SWITCH_MODEL: AQARA_SQUARE_SWITCH, AQARA_SQUARE_SWITCH_WXKG11LM_2016_MODEL: AQARA_SQUARE_SWITCH_WXKG11LM_2016, + AQARA_OPPLE_2_BUTTONS_MODEL: AQARA_OPPLE_2_BUTTONS, + AQARA_OPPLE_4_BUTTONS_MODEL: AQARA_OPPLE_4_BUTTONS, + AQARA_OPPLE_6_BUTTONS_MODEL: AQARA_OPPLE_6_BUTTONS, } TRIGGER_SCHEMA = TRIGGER_BASE_SCHEMA.extend(