"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 exposes = __importStar(require("../lib/exposes"));
const m = __importStar(require("../lib/modernExtend"));
const e = exposes.presets;
exports.definitions = [
    {
        zigbeeModel: ["ICZB-IW11D"],
        model: "ICZB-IW11D",
        vendor: "iCasa",
        description: "Zigbee AC dimmer",
        extend: [m.light({ configureReporting: true })],
    },
    {
        zigbeeModel: ["ICZB-IW21D"],
        model: "ICZB-IW21D",
        vendor: "iCasa",
        description: "Zigbee AC dimmer",
        extend: [m.light({ configureReporting: true }), m.electricityMeter()],
    },
    {
        zigbeeModel: ["ICZB-DC11"],
        model: "ICZB-DC11",
        vendor: "iCasa",
        description: "Zigbee 12-36V DC LED dimmer",
        extend: [m.light({ configureReporting: true })],
    },
    {
        zigbeeModel: ["ICZB-IW11SW"],
        model: "ICZB-IW11SW",
        vendor: "iCasa",
        description: "Zigbee 3.0 AC switch",
        extend: [m.onOff()],
    },
    {
        zigbeeModel: ["ICZB-KPD12"],
        model: "ICZB-KPD12",
        vendor: "iCasa",
        description: "Zigbee 3.0 Keypad Pulse 2",
        meta: { battery: { dontDividePercentage: true } },
        fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery],
        exposes: [e.battery(), e.action(["on", "off", "brightness_move_up", "brightenss_move_down", "brightness_stop"])],
        toZigbee: [],
        whiteLabel: [{ vendor: "Sunricher", model: "SR-ZG9001K2-DIM" }],
    },
    {
        zigbeeModel: ["ICZB-KPD14S"],
        model: "ICZB-KPD14S",
        vendor: "iCasa",
        description: "Zigbee 3.0 Keypad Pulse 4S",
        meta: { battery: { dontDividePercentage: true } },
        fromZigbee: [fz.command_recall, fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop, fz.command_store],
        exposes: [
            e.battery(),
            e.action([
                "on",
                "off",
                "brightness_stop",
                "brightness_move_up",
                "brightness_move_down",
                "recall_1",
                "recall_2",
                "recall_3",
                "recall_4",
                "store_1",
                "store_2",
                "store_3",
                "store_4",
            ]),
        ],
        toZigbee: [],
    },
    {
        zigbeeModel: ["ICZB-KPD18S"],
        model: "ICZB-KPD18S",
        vendor: "iCasa",
        description: "Zigbee 3.0 Keypad Pulse 8S",
        fromZigbee: [fz.command_recall, fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop, fz.command_store],
        exposes: [
            e.battery(),
            e.action([
                "on",
                "off",
                "brightness_stop",
                "brightness_move_up",
                "brightness_move_down",
                "recall_1",
                "recall_2",
                "recall_3",
                "recall_4",
                "recall_5",
                "recall_6",
                "store_1",
                "store_2",
                "store_3",
                "store_4",
                "store_5",
                "store_6",
            ]),
        ],
        toZigbee: [],
    },
    {
        zigbeeModel: ["ICZB-RM11S"],
        model: "ICZB-RM11S",
        vendor: "iCasa",
        description: "Zigbee 3.0 remote control",
        meta: { battery: { dontDividePercentage: true } },
        fromZigbee: [fz.command_recall, fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery],
        exposes: [
            e.battery(),
            e.action(["recall_*", "on", "off", "brightness_stop", "brightness_move_up", "brightness_move_down"]),
            e.action_group(),
        ],
        toZigbee: [],
    },
    {
        zigbeeModel: ["ICZB-FC"],
        model: "ICZB-B1FC60/B3FC64/B2FC95/B2FC125",
        vendor: "iCasa",
        description: "Zigbee 3.0 Filament Lamp 60/64/95/125 mm, 806 lumen, dimmable, clear",
        extend: [m.light({ colorTemp: { range: undefined } })],
    },
    {
        zigbeeModel: ["ICZB-R11D"],
        model: "ICZB-R11D",
        vendor: "iCasa",
        description: "Zigbee AC dimmer",
        extend: [m.light({ configureReporting: true })],
    },
    {
        zigbeeModel: ["ICZB-R12D"],
        model: "ICZB-R12D",
        vendor: "iCasa",
        description: "Zigbee AC dimmer",
        extend: [m.light({ configureReporting: true })],
    },
];
//# sourceMappingURL=icasa.js.map