local device = {} device.model = "E1842" device.vendor = "IKEA" device.description = "KNYCKLAN electronic dishwasher shut-off unit" device.zigbeeModel = { "KNYCKLAN receiver" } 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 = "power_on_behavior", property = "power_on_behavior", access = 7, description = "Controls the behavior when the device is powered on after power loss", category = "config", values = { "off", "on", "toggle", "previous" }, }, { type = "binary", name = "water_leak", property = "water_leak", access = 1, value_on = true, value_off = false, description = "Indicates whether the device detected a water leak", }, { type = "enum", name = "identify", property = "identify", access = 2, description = "Initiate device identification", category = "config", values = { "identify" }, }, { type = "binary", name = "occupancy", property = "occupancy", access = 1, value_on = true, value_off = false, description = "Indicates whether the device detected occupancy", }, { type = "binary", name = "contact", property = "contact", access = 1, value_on = false, value_off = true, description = "Indicates if the contact is closed or open", }, { type = "binary", name = "tamper", property = "tamper", access = 1, value_on = true, value_off = false, description = "Indicates whether the device is tampered", }, { type = "binary", name = "battery_low", property = "battery_low", access = 1, value_on = true, value_off = false, description = "Indicates if the battery of this device is almost empty", category = "diagnostic", }, } device.fromZigbee = { "on_off", "ias_zone" } device.toZigbee = { "on_off" } device.configure = { bind = { "genOnOff", "ssIasZone" }, reporting = { { cluster = "genOnOff", attribute = "onOff", min = 0, max = 3600, change = 0, }, }, } return device