local device = {} device.model = "E1524/E1810" device.vendor = "IKEA" device.description = "TRADFRI remote control" device.zigbeeModel = { "TRADFRI remote control" } 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 = { "toggle", "brightness_up_click", "brightness_down_click", "brightness_up_hold", "brightness_up_release", "brightness_down_hold", "brightness_down_release", "toggle_hold", "arrow_left_click", "arrow_left_hold", "arrow_left_release", "arrow_right_click", "arrow_right_hold", "arrow_right_release", }, }, } device.fromZigbee = { "on_off", "brightness", "battery" } device.configure = { bind = { "genOnOff", "genLevelCtrl", "genPowerCfg" }, reporting = { { cluster = "genOnOff", attribute = "onOff", min = 0, max = 3600, change = 0, }, { cluster = "genLevelCtrl", attribute = "currentLevel", min = 1, max = 3600, change = 1, }, { cluster = "genPowerCfg", attribute = "batteryPercentageRemaining", min = 3600, max = 65000, change = 0, }, { cluster = "genPowerCfg", attribute = "batteryVoltage", min = 3600, max = 65000, change = 0, }, }, } return device