local device = {} device.model = "S31ZB" device.vendor = "SONOFF" device.description = "Zigbee smart plug (US version)" device.zigbeeModel = { "S31 Lite zb" } 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", }, }, }, } device.toZigbee = { "on_off" } return device