local device = {} device.model = "LED1924G9" device.vendor = "IKEA" device.description = "TRADFRI bulb E26/E27, color/white spectrum, globe, opal, 800/806/810 lm" device.zigbeeModel = { "TRADFRI bulb E26 CWS 800lm", "TRADFRI bulb E27 CWS 806lm", "TRADFRI bulb E26 CWS 806lm", "TRADFRI bulb E26 CWS 810lm" } 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 = "numeric", name = "color_temp", property = "color_temp", access = 7, unit = "mired", min = 250, max = 454, description = "Color temperature of this light", }, { type = "numeric", name = "color_temp_startup", property = "color_temp_startup", access = 7, unit = "mired", min = 250, max = 454, description = "Color temperature after cold power on of this light", }, { type = "composite", name = "color_xy", property = "color", access = 7, description = "Color of this light in the CIE 1931 color space (x/y)", features = { { type = "numeric", name = "x", property = "x", access = 7, }, { type = "numeric", name = "y", property = "y", access = 7, }, }, }, { type = "composite", name = "level_config", property = "level_config", access = 7, description = "Configure genLevelCtrl", features = { { type = "binary", name = "execute_if_off", property = "execute_if_off", access = 7, value_on = true, value_off = false, description = "this setting can affect the \"on_level\", \"current_level_startup\" or \"brightness\" setting", }, { type = "numeric", name = "current_level_startup", property = "current_level_startup", access = 7, min = 1, max = 254, description = "Defines the desired startup level for a device when it is supplied with power", }, }, }, }, }, { type = "enum", name = "effect", property = "effect", access = 2, description = "Triggers an effect on the light (e.g. make light blink for a few seconds)", values = { "blink", "breathe", "okay", "channel_change", "finish_effect", "stop_effect", "colorloop", "stop_colorloop", }, }, { 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 = "composite", name = "color_options", property = "color_options", access = 7, description = "Advanced color behavior", category = "config", features = { { type = "binary", name = "execute_if_off", property = "execute_if_off", access = 2, value_on = true, value_off = false, description = "Controls whether color and color temperature can be set while light is off", }, }, }, { type = "enum", name = "identify", property = "identify", access = 2, description = "Initiate device identification", category = "config", values = { "identify" }, }, } device.fromZigbee = { "on_off", "brightness", "color_temp", "color_hs", "color_xy" } device.toZigbee = { "on_off", "brightness", "color_hs", "color_xy", "color_temp" } device.configure = { bind = { "genOnOff", "genLevelCtrl", "lightingColorCtrl" }, reporting = { { cluster = "genOnOff", attribute = "onOff", min = 0, max = 3600, change = 0, }, { cluster = "genLevelCtrl", attribute = "currentLevel", min = 1, max = 3600, change = 1, }, { cluster = "lightingColorCtrl", attribute = "colorTemperatureMireds", min = 1, max = 3600, change = 1, }, }, } return device