local device = {} device.model = "QBKG21LM" device.vendor = "Aqara" device.description = "Smart wall switch D1 (no neutral, single rocker)" device.zigbeeModel = { "lumi.switch.b1lacn02" } device.exposes = { { type = "switch", features = { { type = "binary", name = "state", property = "state", access = 7, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", }, }, }, { type = "enum", name = "operation_mode", property = "operation_mode", access = 7, description = "Decoupled mode", values = { "control_relay", "decoupled" }, }, { type = "enum", name = "action", property = "action", access = 1, description = "Triggered action (e.g. a button click)", category = "diagnostic", values = { "release", "hold", "double", "single", "hold_release" }, }, } device.fromZigbee = { "on_off" } device.toZigbee = { "on_off" } device.configure = { bind = { "genOnOff" }, reporting = { { cluster = "genOnOff", attribute = "onOff", min = 0, max = 3600, change = 0, }, }, } device.endpoint = { system = 1, default = 2, } return device