local device = {} device.model = "4058075816459" device.vendor = "OSRAM" device.description = "Smart+ switch" device.zigbeeModel = { "Switch 4x EU-LIGHTIFY", "Switch 4x-LIGHTIFY", "Switch-LIGHTIFY" } device.exposes = { { type = "numeric", name = "battery", property = "battery", access = 1, unit = "%", min = 0, max = 100, description = "Remaining battery in %, can take up to 24 hours before reported", category = "diagnostic", }, { type = "enum", name = "action", property = "action", access = 1, description = "Triggered action (e.g. a button click)", category = "diagnostic", values = { "on", "off", "color_temperature_step_up", "color_temperature_step_down", "brightness_move_up", "brightness_move_down", "brightness_stop", "move_to_saturation", "hue_move", "hue_stop", }, }, } device.fromZigbee = { "battery" } device.configure = { bind = { "genPowerCfg" }, reporting = { { cluster = "genPowerCfg", attribute = "batteryPercentageRemaining", min = 3600, max = 65000, change = 0, }, { cluster = "genPowerCfg", attribute = "batteryVoltage", min = 3600, max = 65000, change = 0, }, }, } device.meta = { multiEndpoint = true } return device