local device = {} device.model = "LP_CF_7904008_EU" device.vendor = "Philips" device.description = "MasterConnect LEDtube EM/mains T8" device.zigbeeModel = { "LEDtube T8 5FT V2.0" } device.exposes = { { type = "light", features = { { type = "binary", name = "state", property = "state", access = 7, value_on = "ON", value_off = "OFF", description = "On/off state of this light", }, { type = "numeric", name = "brightness", property = "brightness", access = 7, min = 0, max = 254, description = "Brightness of this light", }, }, }, { 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 = "enum", name = "effect", property = "effect", access = 2, values = { "blink", "breathe", "okay", "channel_change", "candle", "finish_effect", "stop_effect", "stop_hue_effect", }, }, } device.fromZigbee = { "on_off", "brightness" } device.configure = { bind = { "genOnOff", "genLevelCtrl" }, reporting = { { cluster = "genOnOff", attribute = "onOff", min = 0, max = 3600, change = 0, }, { cluster = "genLevelCtrl", attribute = "currentLevel", min = 1, max = 3600, change = 1, }, }, } return device