local device = {} device.model = "VC-X01D" device.vendor = "Aqara" device.description = "Valve controller T1" device.zigbeeModel = { "lumi.valve.agl001" } 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 = "numeric", name = "battery", property = "battery", access = 5, unit = "%", min = 0, max = 100, description = "Remaining battery in %", category = "diagnostic", }, } device.fromZigbee = { "on_off", "battery" } device.toZigbee = { "on_off" } 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