"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.definitions = void 0;
const fz = __importStar(require("../converters/fromZigbee"));
const tz = __importStar(require("../converters/toZigbee"));
const exposes = __importStar(require("../lib/exposes"));
const m = __importStar(require("../lib/modernExtend"));
const sunricher = __importStar(require("../lib/sunricher"));
const e = exposes.presets;
const ea = exposes.access;
exports.definitions = [
    {
        zigbeeModel: ["5715"],
        model: "5715",
        vendor: "Iluminize",
        description: "Zigbee micro smart dimmer",
        extend: [m.light({ configureReporting: true }), m.electricityMeter(), sunricher.extend.externalSwitchType(), sunricher.extend.minimumPWM()],
    },
    {
        zigbeeModel: ["5717"],
        model: "5717",
        vendor: "Iluminize",
        description: "Zigbee din rail smart dimmer",
        extend: [m.light({ configureReporting: true }), m.electricityMeter(), sunricher.extend.externalSwitchType(), sunricher.extend.minimumPWM()],
    },
    {
        zigbeeModel: ["ZGRC-KEY-005"],
        model: "5144.01",
        vendor: "Iluminize",
        description: "RGB CCT 3 in 1 Remote Controller",
        extend: [m.battery({ percentageReporting: false }), m.identify(), m.commandsOnOff(), m.commandsLevelCtrl(), m.commandsColorCtrl()],
    },
    {
        zigbeeModel: ["ZGRC-KEY-001"],
        model: "5144.11",
        vendor: "Iluminize",
        description: "Zigbee 3.0 wall dimmer with switches",
        extend: [m.battery({ percentageReporting: false }), m.identify(), m.commandsOnOff(), m.commandsLevelCtrl()],
    },
    {
        zigbeeModel: ["ZGRC-KEY-002"],
        model: "5144.21",
        vendor: "Iluminize",
        description: "Single color wall mounted push button remote",
        extend: [m.battery({ percentageReporting: false }), m.identify(), m.commandsOnOff(), m.commandsLevelCtrl(), m.commandsColorCtrl()],
    },
    {
        zigbeeModel: ["5121.10"],
        model: "5121.10",
        vendor: "Iluminize",
        description: "Rotary dimmer with integrated Zigbee 3.0 dimming actuator",
        extend: [m.light({ configureReporting: true })],
    },
    {
        zigbeeModel: ["5120.2210"],
        model: "5120.2210",
        vendor: "Iluminize",
        description: "Zigbee 3.0 actuator mini 1x 230V",
        extend: [m.onOff()],
    },
    {
        fingerprint: [{ modelID: "511.050" }, { modelID: "RGBWW Lighting", manufacturerName: "Iluminize" }],
        model: "511.050",
        vendor: "Iluminize",
        description: "Zigbee 3.0 LED controller for 5in1 RGB+CCT LEDs",
        extend: [m.light({ colorTemp: { range: [155, 450] }, color: true })],
    },
    {
        fingerprint: [
            { modelID: "DIM Lighting", manufacturerName: "Iluminize" },
            { modelID: "DIM Lighting", manufacturerName: "Sunricher" },
        ],
        model: "511.10",
        vendor: "Iluminize",
        description: "Zigbee LED-Controller",
        extend: [m.light()],
    },
    {
        zigbeeModel: ["511.201"],
        model: "511.201",
        vendor: "Iluminize",
        description: "Zigbee 3.0 dimming actuator mini 1x 230V",
        extend: [m.light({ configureReporting: true })],
    },
    {
        zigbeeModel: ["511.020"],
        model: "511.020",
        vendor: "Iluminize",
        description: "Zigbee 3.0 LED controller multi 4 - 5A, CCT WW/CW LED",
        extend: [m.light({ colorTemp: { range: [155, 450] } })],
    },
    {
        zigbeeModel: ["5120.1100"],
        model: "5120.1100",
        vendor: "Iluminize",
        description: "Zigbee 3.0 dimming actuator mini 1x 230V",
        extend: [m.light({ configureReporting: true })],
    },
    {
        zigbeeModel: ["5120.1110"],
        model: "5120.1110",
        vendor: "Iluminize",
        description: "Zigbee 3.0 dimming actuator mini 1x 230V",
        extend: [m.light({ configureReporting: true })],
    },
    {
        zigbeeModel: ["5120.2110"],
        model: "5120.2110",
        vendor: "Iluminize",
        description: "Zigbee 3.0 dimming actuator mini 1x 230V",
        extend: [m.light({ configureReporting: true })],
    },
    {
        zigbeeModel: ["5123.1110"],
        model: "5123.1110",
        vendor: "Iluminize",
        description: "Zigbee 3.0 controller with adjustable current 250-1500mA, max. 50W / 48V SELV",
        extend: [m.light({ configureReporting: true })],
    },
    {
        zigbeeModel: ["511.010"],
        model: "511.010",
        vendor: "Iluminize",
        description: "Zigbee LED-Controller",
        extend: [m.light()],
    },
    {
        zigbeeModel: ["511.012"],
        model: "511.012",
        vendor: "Iluminize",
        description: "Zigbee LED-Controller",
        extend: [m.light()],
    },
    {
        zigbeeModel: ["511.202"],
        model: "511.202",
        vendor: "Iluminize",
        description: "Zigbee 3.0 switch mini 1x230V, 200W/400W",
        extend: [m.onOff()],
    },
    {
        zigbeeModel: ["5120.1200"],
        model: "5120.1200",
        vendor: "Iluminize",
        description: "Zigbee 3.0 switch mini 1x230V with neutral, 200W/400W",
        extend: [m.onOff()],
    },
    {
        zigbeeModel: ["5120.1210"],
        model: "5120.1210",
        vendor: "Iluminize",
        description: "Zigbee 3.0 switch mini 1x230V without neutral, 200W/400W",
        extend: [m.onOff()],
    },
    {
        zigbeeModel: ["5128.10"],
        model: "5128.10",
        vendor: "Iluminize",
        description: "Zigbee 3.0 switch shutter SW with level control",
        fromZigbee: [fz.cover_position_via_brightness, fz.cover_state_via_onoff, fz.cover_position_tilt],
        toZigbee: [tz.cover_state, tz.cover_via_brightness],
        exposes: [e.cover_position()],
        ota: true,
    },
    {
        zigbeeModel: ["ZG2801K2-G1-RGB-CCT-LEAD"],
        model: "511.557",
        vendor: "Iluminize",
        description: "Zigbee 3.0 wall dimmer",
        fromZigbee: [fz.command_off, fz.command_on, fz.command_move_to_color_temp, fz.command_move_to_color],
        toZigbee: [],
        exposes: [e.action(["off", "on", "color_temperature_move", "color_move"])],
    },
    {
        fingerprint: [{ modelID: "511.040" }, { modelID: "RGBW-CCT", manufacturerName: "Iluminize" }],
        model: "511.040",
        vendor: "Iluminize",
        description: "Zigbee 3.0 LED-controller, 4 channel 5A, RGBW LED",
        extend: [m.light({ colorTemp: { range: undefined }, color: true })],
    },
    {
        zigbeeModel: ["HK-ZD-RGB-A", "5110.40", "5110.80"],
        model: "5110.40",
        vendor: "Iluminize",
        description: "Zigbee 3.0 LED controller, 5 Ch (12V - 24V) - 4A, RGB W/CCT LED",
        whiteLabel: [
            {
                model: "5110.80",
                vendor: "Iluminize",
                description: "Zigbee 3.0 LED controller, 5 Ch (12V - 48V) - 8A, RGB W/CCT LED",
                fingerprint: [{ modelID: "5110.80" }],
            },
        ],
        extend: [m.light({ colorTemp: { range: [160, 450] }, color: true, configureReporting: true })],
    },
    {
        zigbeeModel: ["5112.80"],
        model: "5112.80",
        vendor: "Iluminize",
        description: "LED controller",
        extend: [m.light({ configureReporting: true })],
    },
    {
        zigbeeModel: ["HK-ZD-RGBCCT-A", "511.000"],
        model: "511.000",
        vendor: "Iluminize",
        whiteLabel: [{ vendor: "Sunricher", model: "HK-ZD-RGBCCT-A" }],
        description: "Zigbee 3.0 universal LED-controller, 5 channel, RGBCCT LED",
        extend: [m.light({ colorTemp: { range: undefined }, color: true, configureReporting: true })],
    },
    {
        zigbeeModel: ["511.324"],
        model: "511.324",
        vendor: "Iluminize",
        description: "Zigbee handheld remote CCT 4 channels",
        fromZigbee: [
            fz.battery,
            fz.command_move_to_color,
            fz.command_move_to_color_temp,
            fz.command_move_hue,
            fz.command_step,
            fz.command_recall,
            fz.command_on,
            fz.command_off,
            fz.command_toggle,
            fz.command_stop,
            fz.command_move,
            fz.command_color_loop_set,
            fz.command_enhanced_move_to_hue_and_saturation,
        ],
        exposes: [
            e.battery(),
            e.action([
                "color_move",
                "color_temperature_move",
                "hue_move",
                "brightness_step_up",
                "brightness_step_down",
                "recall_*",
                "on",
                "off",
                "toggle",
                "brightness_stop",
                "brightness_move_up",
                "brightness_move_down",
                "color_loop_set",
                "enhanced_move_to_hue_and_saturation",
                "hue_stop",
            ]),
            e.numeric("action_group", ea.STATE).withDescription("Shows the zigbee2mqtt group bound to the active data point EP(1-4)."),
            e.numeric("action_transition_time", ea.STATE),
            e.numeric("action_step_size", ea.STATE),
            e.numeric("action_rate", ea.STATE),
        ],
        toZigbee: [],
        meta: { multiEndpoint: true },
        endpoint: (device) => {
            return { ep1: 1, ep2: 2, ep3: 3, ep4: 4 };
        },
    },
    {
        zigbeeModel: ["ZGRC-TEUR-002"],
        model: "511.541",
        vendor: "Iluminize",
        description: "Zigbee 3.0 wall dimmer RGBW 1 zone",
        fromZigbee: [
            fz.command_recall,
            fz.command_on,
            fz.command_off,
            fz.command_move_to_color,
            fz.command_move_to_color_temp,
            fz.command_move_hue,
            fz.command_step,
            fz.command_move,
            fz.command_stop,
        ],
        toZigbee: [],
        exposes: [
            e.action([
                "recall_*",
                "on",
                "off",
                "color_move",
                "color_temperature_move",
                "hue_move",
                "brightness_step_down",
                "brightness_step_up",
                "brightness_move_down",
                "brightness_move_up",
                "brightness_stop",
            ]),
        ],
    },
    {
        zigbeeModel: ["ZGRC-TEUR-001"],
        model: "511.544",
        vendor: "Iluminize",
        description: "Zigbee 3.0 wall dimmer RGBW 4 zones",
        fromZigbee: [fz.command_move_to_color, fz.command_move_hue, fz.command_on, fz.command_off, fz.command_move],
        toZigbee: [],
        exposes: [
            e.action([
                "recall_*",
                "on",
                "off",
                "color_move",
                "color_temperature_move",
                "hue_move",
                "brightness_step_down",
                "brightness_step_up",
                "brightness_move_down",
                "brightness_move_up",
                "brightness_stop",
            ]),
        ],
    },
    {
        zigbeeModel: ["ZGRC-TEUR-003"],
        model: "511.524",
        vendor: "Iluminize",
        description: "Zigbee 3.0 wall dimmer CCT 4 zones",
        fromZigbee: [
            fz.command_on,
            fz.command_off,
            fz.command_recall,
            fz.command_move_to_color_temp,
            fz.command_step,
            fz.command_move,
            fz.command_stop,
        ],
        toZigbee: [],
        meta: { multiEndpoint: true },
        exposes: [
            e.action([
                "recall_*",
                "on",
                "off",
                "brightness_step_down",
                "brightness_step_up",
                "brightness_move_down",
                "brightness_move_up",
                "brightness_stop",
                "color_move",
                "color_temperature_move",
                "hue_move",
                "color_loop_set",
                "enhanced_move_to_hue_and_saturation",
                "hue_stop",
            ]),
        ],
    },
];
//# sourceMappingURL=iluminize.js.map