local device = {} device.model = "E2001/E2002/E2313" device.vendor = "IKEA" device.description = "STYRBAR remote control" device.zigbeeModel = { "Remote Control N2" } device.exposes = { { type = "enum", name = "identify", property = "identify", access = 2, description = "Initiate device identification. This device is asleep by default.You may need to wake it up first before sending the identify command.", category = "config", values = { "identify" }, }, { type = "numeric", name = "battery", property = "battery", access = 5, unit = "%", min = 0, max = 100, description = "Remaining battery in %", category = "diagnostic", }, { type = "enum", name = "action", property = "action", access = 1, description = "Triggered action (e.g. a button click)", category = "diagnostic", values = { "on", "off", "brightness_move_up", "brightness_move_down", "brightness_stop", "arrow_left_click", "arrow_left_hold", "arrow_left_release", "arrow_right_click", "arrow_right_hold", "arrow_right_release", }, }, } device.fromZigbee = { "on_off", "battery" } device.configure = { bind = { "genOnOff", "genPowerCfg" }, reporting = { { cluster = "genOnOff", attribute = "onOff", min = 0, max = 3600, change = 0, }, { cluster = "genPowerCfg", attribute = "batteryPercentageRemaining", min = 3600, max = 65000, change = 0, }, { cluster = "genPowerCfg", attribute = "batteryVoltage", min = 3600, max = 65000, change = 0, }, }, } return device