zigbee-herdsman-converters
Version:
Collection of device converters to be used with zigbee-herdsman
1,168 lines • 100 kB
JavaScript
"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 zigbee_herdsman_1 = require("zigbee-herdsman");
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 reporting = __importStar(require("../lib/reporting"));
const utils = __importStar(require("../lib/utils"));
const e = exposes.presets;
const ea = exposes.access;
const clickLookup = {
0: "single",
1: "release",
2: "held",
3: "double",
4: "triple",
5: "quadruple",
6: "quintuple",
};
const buttonLookup = {
1: "down",
2: "up",
3: "config",
4: "aux_down",
5: "aux_up",
6: "aux_config",
};
const ledEffects = {
off: 0,
solid: 1,
fast_blink: 2,
slow_blink: 3,
pulse: 4,
chase: 5,
open_close: 6,
small_to_big: 7,
aurora: 8,
slow_falling: 9,
medium_falling: 10,
fast_falling: 11,
slow_rising: 12,
medium_rising: 13,
fast_rising: 14,
medium_blink: 15,
slow_chase: 16,
fast_chase: 17,
fast_siren: 18,
slow_siren: 19,
clear_effect: 255,
};
const individualLedEffects = {
off: 0,
solid: 1,
fast_blink: 2,
slow_blink: 3,
pulse: 4,
chase: 5,
falling: 6,
rising: 7,
aurora: 8,
clear_effect: 255,
};
const mmWaveControlCommands = {
set_interference: 1,
clear_interference: 3,
reset_detection_area: 4,
reset_mmwave_module: 0,
};
const INOVELLI_CLUSTER_NAME = "manuSpecificInovelli";
const INOVELLI_MMWAVE_CLUSTER_NAME = "manuSpecificInovelliMMWave";
const inovelliExtend = {
addCustomClusterInovelli: () => m.deviceAddCustomCluster(INOVELLI_CLUSTER_NAME, {
ID: 64561,
manufacturerCode: 0x122f,
attributes: {
dimmingSpeedUpRemote: { ID: 0x0001, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
dimmingSpeedUpLocal: { ID: 0x0002, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
rampRateOffToOnRemote: { ID: 0x0003, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
rampRateOffToOnLocal: { ID: 0x0004, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
dimmingSpeedDownRemote: { ID: 0x0005, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
dimmingSpeedDownLocal: { ID: 0x0006, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
rampRateOnToOffRemote: { ID: 0x0007, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
rampRateOnToOffLocal: { ID: 0x0008, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
minimumLevel: { ID: 0x0009, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
maximumLevel: { ID: 0x000a, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
invertSwitch: { ID: 0x000b, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
autoTimerOff: { ID: 0x000c, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
defaultLevelLocal: { ID: 0x000d, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLevelRemote: { ID: 0x000e, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
stateAfterPowerRestored: { ID: 0x000f, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
loadLevelIndicatorTimeout: { ID: 0x0011, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
activePowerReports: { ID: 0x0012, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
periodicPowerAndEnergyReports: { ID: 0x0013, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
activeEnergyReports: { ID: 0x0014, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
powerType: { ID: 0x0015, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
switchType: { ID: 0x0016, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
quickStartTime: { ID: 0x0017, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
quickStartLevel: { ID: 0x0018, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
higherOutputInNonNeutral: { ID: 0x0019, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
dimmingMode: { ID: 0x001a, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
nonNeutralAuxMediumGear: { ID: 0x001e, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
nonNeutralAuxLowGear: { ID: 0x001f, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
internalTemperature: { ID: 0x0020, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
overheat: { ID: 0x0021, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
otaImageType: { ID: 0x0022, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
buttonDelay: { ID: 0x0032, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
deviceBindNumber: { ID: 0x0033, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
smartBulbMode: { ID: 0x0034, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
doubleTapUpToParam55: { ID: 0x0035, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
doubleTapDownToParam56: { ID: 0x0036, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
brightnessLevelForDoubleTapUp: { ID: 0x0037, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
brightnessLevelForDoubleTapDown: { ID: 0x0038, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed1ColorWhenOn: { ID: 0x003c, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed1ColorWhenOff: { ID: 0x003d, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed1IntensityWhenOn: { ID: 0x003e, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed1IntensityWhenOff: { ID: 0x003f, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed2ColorWhenOn: { ID: 0x0041, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed2ColorWhenOff: { ID: 0x0042, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed2IntensityWhenOn: { ID: 0x0043, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed2IntensityWhenOff: { ID: 0x0044, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed3ColorWhenOn: { ID: 0x0046, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed3ColorWhenOff: { ID: 0x0047, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed3IntensityWhenOn: { ID: 0x0048, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed3IntensityWhenOff: { ID: 0x0049, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed4ColorWhenOn: { ID: 0x004b, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed4ColorWhenOff: { ID: 0x004c, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed4IntensityWhenOn: { ID: 0x004d, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed4IntensityWhenOff: { ID: 0x004e, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed5ColorWhenOn: { ID: 0x0050, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed5ColorWhenOff: { ID: 0x0051, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed5IntensityWhenOn: { ID: 0x0052, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed5IntensityWhenOff: { ID: 0x0053, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed6ColorWhenOn: { ID: 0x0055, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed6ColorWhenOff: { ID: 0x0056, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed6IntensityWhenOn: { ID: 0x0057, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed6IntensityWhenOff: { ID: 0x0058, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed7ColorWhenOn: { ID: 0x005a, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed7ColorWhenOff: { ID: 0x005b, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed7IntensityWhenOn: { ID: 0x005c, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
defaultLed7IntensityWhenOff: { ID: 0x005d, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
ledColorWhenOn: { ID: 0x005f, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
ledColorWhenOff: { ID: 0x060, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
ledIntensityWhenOn: { ID: 0x0061, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
ledIntensityWhenOff: { ID: 0x0062, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
ledBarScaling: { ID: 0x0064, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
mmwaveControlWiredDevice: { ID: 0x006e, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
mmWaveRoomSizePreset: { ID: 0x0075, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
singleTapBehavior: { ID: 0x0078, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
fanTimerMode: { ID: 0x0079, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
auxSwitchUniqueScenes: { ID: 0x007b, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
bindingOffToOnSyncLevel: { ID: 0x007d, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
breezeMode: { ID: 0x0081, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
fanControlMode: { ID: 0x0082, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
lowLevelForFanControlMode: { ID: 0x0083, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
mediumLevelForFanControlMode: { ID: 0x0084, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
highLevelForFanControlMode: { ID: 0x0085, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
ledColorForFanControlMode: { ID: 0x0086, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
localProtection: { ID: 0x0100, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
remoteProtection: { ID: 0x0101, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
outputMode: { ID: 0x0102, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
onOffLedMode: { ID: 0x0103, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
firmwareUpdateInProgressIndicator: { ID: 0x0104, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
relayClick: { ID: 0x105, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
doubleTapClearNotifications: { ID: 0x106, type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
fanLedLevelType: { ID: 0x0107, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
},
commands: {
ledEffect: {
ID: 1,
parameters: [
{ name: "effect", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
{ name: "color", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
{ name: "level", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
{ name: "duration", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
],
},
individualLedEffect: {
ID: 3,
parameters: [
{ name: "led", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
{ name: "effect", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
{ name: "color", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
{ name: "level", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
{ name: "duration", type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
],
},
ledEffectComplete: {
ID: 0x24,
parameters: [{ name: "notificationType", type: zigbee_herdsman_1.Zcl.DataType.UINT8 }],
},
},
commandsResponse: {},
}),
addCustomMMWaveClusterInovelli: () => m.deviceAddCustomCluster(INOVELLI_MMWAVE_CLUSTER_NAME, {
ID: 64562, // 0xfc32
manufacturerCode: 0x122f,
attributes: {
mmWaveHoldTime: { ID: 0x0072, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
mmWaveDetectSensitivity: { ID: 0x0070, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
mmWaveDetectTrigger: { ID: 0x0071, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
mmWaveTargetInfoReport: { ID: 0x006b, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
mmWaveStayLife: { ID: 0x006c, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
mmWaveVersion: { ID: 0x0073, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
mmWaveHeightMin: { ID: 0x0065, type: zigbee_herdsman_1.Zcl.DataType.INT16 },
mmWaveHeightMax: { ID: 0x0066, type: zigbee_herdsman_1.Zcl.DataType.INT16 },
mmWaveWidthMin: { ID: 0x0067, type: zigbee_herdsman_1.Zcl.DataType.INT16 },
mmWaveWidthMax: { ID: 0x0068, type: zigbee_herdsman_1.Zcl.DataType.INT16 },
mmWaveDepthMin: { ID: 0x0069, type: zigbee_herdsman_1.Zcl.DataType.INT16 },
mmWaveDepthMax: { ID: 0x006a, type: zigbee_herdsman_1.Zcl.DataType.INT16 },
},
commands: {
mmWaveControl: {
ID: 0,
parameters: [{ name: "controlID", type: zigbee_herdsman_1.Zcl.DataType.UINT8 }],
},
},
commandsResponse: {
anyoneInReportingArea: {
ID: 0,
parameters: [
{ name: "area1", type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
{ name: "area2", type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
{ name: "area3", type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
{ name: "area4", type: zigbee_herdsman_1.Zcl.DataType.BOOLEAN },
],
},
},
}),
};
const fanModes = { off: 0, low: 2, smart: 4, medium: 86, high: 170, on: 255 };
const breezemodes = ["off", "low", "medium", "high"];
const LED_NOTIFICATION_TYPES = {
0: "LED_1",
1: "LED_2",
2: "LED_3",
3: "LED_4",
4: "LED_5",
5: "LED_6",
6: "LED_7",
16: "ALL_LEDS",
255: "CONFIG_BUTTON_DOUBLE_PRESS",
};
const INOVELLI = 0x122f;
// Converts brightness level to a fan mode
const intToFanMode = (value) => {
let selectedMode = "low";
if (value >= fanModes.low) {
selectedMode = "low";
}
if (value >= fanModes.medium) {
selectedMode = "medium";
}
if (value >= fanModes.high) {
selectedMode = "high";
}
if (value === 4) {
selectedMode = "smart";
}
if (value === 0) {
selectedMode = "off";
}
return selectedMode;
};
/**
* Convert speed string to int needed for breeze mode calculation.
* @param speedIn - speed string
* @returns low = 1, medium = 2, high = 3, off = 0
*/
const speedToInt = (speedIn) => {
switch (speedIn) {
case "low":
return 1;
case "medium":
return 2;
case "high":
return 3;
default:
return 0;
}
};
// Create Expose list with Inovelli Parameters definitions
const attributesToExposeList = (attributes, exposesList) => {
Object.keys(attributes).forEach((key) => {
if (attributes[key].displayType === "enum") {
const enumE = e
.enum(key, attributes[key].readOnly ? ea.STATE_GET : ea.ALL, Object.keys(attributes[key].values))
.withDescription(attributes[key].description);
if (!attributes[key].readOnly) {
enumE.withCategory(attributes[key].category ?? "config");
}
exposesList.push(enumE);
}
else if (attributes[key].displayType === "binary" || attributes[key].displayType === "switch") {
const binary = e
.binary(key, attributes[key].readOnly ? ea.STATE_GET : ea.ALL,
// @ts-expect-error ignore
attributes[key].values.Enabled, attributes[key].values.Disabled)
.withDescription(attributes[key].description);
if (!attributes[key].readOnly) {
binary.withCategory(attributes[key].category ?? "config");
}
exposesList.push(binary);
}
else {
const numeric = e
.numeric(key, attributes[key].readOnly ? ea.STATE_GET : ea.ALL)
.withValueMin(attributes[key].min)
.withValueMax(attributes[key].max);
if (attributes[key].values) {
Object.keys(attributes[key].values).forEach((value) => {
numeric.withPreset(value, attributes[key].values[value], "");
});
}
if (attributes[key].unit) {
numeric.withUnit(attributes[key].unit);
}
numeric.withDescription(attributes[key].description);
if (!attributes[key].readOnly) {
numeric.withCategory(attributes[key].category ?? "config");
}
exposesList.push(numeric);
}
});
};
/**
* Common Attributes
*
* These attributes are shared between all devices with the manufacturer specific Inovelli cluster
* Some of the descriptions, max, min or value properties may be overridden for each device
*/
const COMMON_ATTRIBUTES = {
dimmingSpeedUpRemote: {
ID: 1,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 127,
description: "This changes the speed that the light dims up when controlled from the hub. " +
"A setting of 0 turns the light immediately on. Increasing the value slows down the transition speed. " +
"Every number represents 100ms. Default = 25 (2.5s)",
},
dimmingSpeedUpLocal: {
ID: 2,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 127,
description: "This changes the speed that the light dims up when controlled at the switch. " +
"A setting of 0 turns the light immediately on. Increasing the value slows down the transition speed. " +
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpRemote setting.",
},
rampRateOffToOnRemote: {
ID: 3,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 127,
description: "This changes the speed that the light turns on when controlled from the hub. " +
"A setting of 0 turns the light immediately on. Increasing the value slows down the transition speed. " +
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpRemote setting.",
},
rampRateOffToOnLocal: {
ID: 4,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 127,
description: "This changes the speed that the light turns on when controlled at the switch. " +
"A setting of 0 turns the light immediately on. Increasing the value slows down the transition speed. " +
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpRemote setting.",
},
dimmingSpeedDownRemote: {
ID: 5,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 127,
description: "This changes the speed that the light dims down when controlled from the hub. " +
"A setting of 0 turns the light immediately off. Increasing the value slows down the transition speed. " +
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpRemote setting.",
},
dimmingSpeedDownLocal: {
ID: 6,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 127,
description: "This changes the speed that the light dims down when controlled at the switch. " +
"A setting of 0 turns the light immediately off. Increasing the value slows down the transition speed. " +
"Every number represents 100ms. Default = 127 - Keep in sync with dimmingSpeedUpLocal setting.",
},
rampRateOnToOffRemote: {
ID: 7,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 127,
description: "This changes the speed that the light turns off when controlled from the hub. " +
"A setting of 'instant' turns the light immediately off. Increasing the value slows down the transition speed. " +
"Every number represents 100ms. Default = 127 - Keep in sync with rampRateOffToOnRemote setting.",
},
rampRateOnToOffLocal: {
ID: 8,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 127,
description: "This changes the speed that the light turns off when controlled at the switch. " +
"A setting of 'instant' turns the light immediately off. Increasing the value slows down the transition speed. " +
"Every number represents 100ms. Default = 127 - Keep in sync with rampRateOffToOnLocal setting.",
},
invertSwitch: {
ID: 11,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { Yes: 1, No: 0 },
min: 0,
max: 1,
description: "Inverts the orientation of the switch." +
" Useful when the switch is installed upside down. Essentially up becomes down and down becomes up.",
},
autoTimerOff: {
ID: 12,
min: 0,
max: 32767,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT16,
unit: "seconds",
values: { Disabled: 0 },
description: "Automatically turns the switch off after this many seconds." +
" When the switch is turned on a timer is started. When the timer expires, the switch is turned off. 0 = Auto off is disabled.",
},
defaultLevelLocal: {
ID: 13,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "Default level for the load when it is turned on at the switch." +
" A setting of 255 means that the switch will return to the level that it was on before it was turned off.",
},
defaultLevelRemote: {
ID: 14,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "Default level for the load when it is turned on from the hub." +
" A setting of 255 means that the switch will return to the level that it was on before it was turned off.",
},
stateAfterPowerRestored: {
ID: 15,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "The state the switch should return to when power is restored after power failure. 0 = off, 1-254 = level, 255 = previous.",
},
loadLevelIndicatorTimeout: {
ID: 17,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
description: "Shows the level that the load is at for x number of seconds after the load is adjusted" +
" and then returns to the Default LED state. 0 = Stay Off, 1-10 = seconds, 11 = Stay On.",
displayType: "enum",
values: {
"Stay Off": 0,
"1 Second": 1,
"2 Seconds": 2,
"3 Seconds": 3,
"4 Seconds": 4,
"5 Seconds": 5,
"6 Seconds": 6,
"7 Seconds": 7,
"8 Seconds": 8,
"9 Seconds": 9,
"10 Seconds": 10,
"Stay On": 11,
},
min: 0,
max: 11,
},
switchType: {
ID: 22,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
displayType: "enum",
values: { "Single Pole": 0, "3-Way Dumb Switch": 1, "3-Way Aux Switch": 2, "Single-Pole Full Sine Wave": 3 },
min: 0,
max: 3,
description: "Set the switch configuration.",
},
internalTemperature: {
ID: 32,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 127,
readOnly: true,
description: "The temperature measured by the temperature sensor inside the chip, in degrees Celsius",
category: "diagnostic",
unit: "°C",
},
overheat: {
ID: 33,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { "No Alert": 0, Overheated: 1 },
min: 0,
max: 1,
readOnly: true,
description: "Indicates if the internal chipset is currently in an overheated state.",
},
buttonDelay: {
ID: 50,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
values: {
"0ms": 0,
"100ms": 1,
"200ms": 2,
"300ms": 3,
"400ms": 4,
"500ms": 5,
"600ms": 6,
"700ms": 7,
"800ms": 8,
"900ms": 9,
},
displayType: "enum",
min: 0,
max: 9,
description: "This will set the button press delay. 0 = no delay (Disables Button Press Events), Default = 500ms.",
},
deviceBindNumber: {
ID: 51,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
readOnly: true,
description: "The number of devices currently bound (excluding gateways) and counts one group as two devices",
},
smartBulbMode: {
ID: 52,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { Disabled: 0, "Smart Bulb Mode": 1 },
description: "For use with Smart Bulbs that need constant power and are controlled via commands rather than power.",
},
doubleTapUpToParam55: {
ID: 53,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { Disabled: 0, Enabled: 1 },
description: "Enable or Disable setting level to parameter 55 on double-tap UP.",
},
doubleTapDownToParam56: {
ID: 54,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { Disabled: 0, Enabled: 1 },
description: "Enable or Disable setting level to parameter 56 on double-tap DOWN.",
},
brightnessLevelForDoubleTapUp: {
ID: 55,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 2,
max: 255,
description: "Set this level on double-tap UP (if enabled by P53). 255 = send ON command.",
},
brightnessLevelForDoubleTapDown: {
ID: 56,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "Set this level on double-tap DOWN (if enabled by P54). 255 = send OFF command.",
},
ledColorWhenOn: {
ID: 95,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
values: {
Red: 0,
Orange: 21,
Yellow: 42,
Green: 85,
Cyan: 127,
Blue: 170,
Violet: 212,
Pink: 234,
White: 255,
},
description: "Set the color of the LED Indicator when the load is on.",
},
ledColorWhenOff: {
ID: 96,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
values: {
Red: 0,
Orange: 21,
Yellow: 42,
Green: 85,
Cyan: 127,
Blue: 170,
Violet: 212,
Pink: 234,
White: 255,
},
description: "Set the color of the LED Indicator when the load is off.",
},
ledIntensityWhenOn: {
ID: 97,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 100,
description: "Set the intensity of the LED Indicator when the load is on.",
},
ledIntensityWhenOff: {
ID: 98,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 100,
description: "Set the intensity of the LED Indicator when the load is off.",
},
singleTapBehavior: {
ID: 120,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
displayType: "enum",
values: { "Old Behavior": 0, "New Behavior": 1, "Down Always Off": 2 },
description: "Behavior of single tapping the on or off button. Old behavior turns the switch on or off. " +
"New behavior cycles through the levels set by P131-133. Down Always Off is like the new behavior but " +
"down always turns the switch off instead of going to next lower speed.",
},
fanControlMode: {
ID: 130,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
displayType: "enum",
values: { Disabled: 0, "Multi Tap": 1, Cycle: 2 },
description: "Which mode to use when binding EP3 (config button) to another device (like a fan module).",
},
lowLevelForFanControlMode: {
ID: 131,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 2,
max: 254,
description: "Level to send to device bound to EP3 when set to low.",
},
mediumLevelForFanControlMode: {
ID: 132,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 2,
max: 254,
description: "Level to send to device bound to EP3 when set to medium.",
},
highLevelForFanControlMode: {
ID: 133,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 2,
max: 254,
description: "Level to send to device bound to EP3 when set to high.",
},
ledColorForFanControlMode: {
ID: 134,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
values: {
Red: 0,
Orange: 21,
Yellow: 42,
Green: 85,
Cyan: 127,
Blue: 170,
Violet: 212,
Pink: 234,
White: 255,
},
description: "LED color used to display fan control mode.",
},
auxSwitchUniqueScenes: {
ID: 123,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { Disabled: 0, Enabled: 1 },
description: "Have unique scene numbers for scenes activated with the aux switch.",
},
bindingOffToOnSyncLevel: {
ID: 125,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { Disabled: 0, Enabled: 1 },
description: "Send Move_To_Level using Default Level with Off/On to bound devices.",
},
localProtection: {
ID: 256,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
values: { Disabled: 0, Enabled: 1 },
description: "Ability to control switch from the wall.",
displayType: "enum",
},
remoteProtection: {
ID: 257,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
values: { Disabled: 0, Enabled: 1 },
readOnly: true,
description: "Ability to control switch from the hub.",
displayType: "enum",
},
onOffLedMode: {
ID: 259,
min: 0,
max: 1,
values: { All: 0, One: 1 },
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
description: "When the device is in On/Off mode, use full LED bar or just one LED.",
displayType: "enum",
},
firmwareUpdateInProgressIndicator: {
ID: 260,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
values: { Disabled: 0, Enabled: 1 },
description: "Display progress on LED bar during firmware update.",
displayType: "enum",
},
defaultLed1ColorWhenOn: {
ID: 60,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed1ColorWhenOff: {
ID: 61,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed1IntensityWhenOn: {
ID: 62,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed1IntensityWhenOff: {
ID: 63,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed2ColorWhenOn: {
ID: 65,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed2ColorWhenOff: {
ID: 66,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed2IntensityWhenOn: {
ID: 67,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed2IntensityWhenOff: {
ID: 68,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed3ColorWhenOn: {
ID: 70,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed3ColorWhenOff: {
ID: 71,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed3IntensityWhenOn: {
ID: 72,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed3IntensityWhenOff: {
ID: 73,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed4ColorWhenOn: {
ID: 75,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed4ColorWhenOff: {
ID: 76,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed4IntensityWhenOn: {
ID: 77,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed4IntensityWhenOff: {
ID: 78,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed5ColorWhenOn: {
ID: 80,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed5ColorWhenOff: {
ID: 81,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed5IntensityWhenOn: {
ID: 82,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed5IntensityWhenOff: {
ID: 83,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed6ColorWhenOn: {
ID: 85,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed6ColorWhenOff: {
ID: 86,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed6IntensityWhenOn: {
ID: 87,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed6IntensityWhenOff: {
ID: 88,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed7ColorWhenOn: {
ID: 90,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed7ColorWhenOff: {
ID: 91,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 255,
description: "0-254:This is the color of the LED strip in a hex representation. 255:Synchronization with default all LED strip color parameter.",
},
defaultLed7IntensityWhenOn: {
ID: 92,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when on. 101 = Synchronized with default all LED strip intensity parameter.",
},
defaultLed7IntensityWhenOff: {
ID: 93,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 101,
description: "Intensity of LED strip when off. 101 = Synchronized with default all LED strip intensity parameter.",
},
fanTimerMode: {
ID: 121,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { Disabled: 0, Enabled: 1 },
description: "Enable or disable advanced timer mode to have the switch act like a bathroom fan timer",
},
doubleTapClearNotifications: {
ID: 262,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
min: 0,
max: 1,
description: "Double-Tap the Config button to clear notifications.",
values: { "Enabled (Default)": 0, Disabled: 1 },
displayType: "enum",
},
fanLedLevelType: {
ID: 263,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 10,
values: { "Limitless (like VZM31)": 0, "Adaptive LED": 10 },
description: "Level display of the LED Strip",
},
};
/**
* Common Dimmer Attributes
*
* These attributes are shared between all devices that act like dimmers (including dimmers + fan switches) with
* the manufacturer specific Inovelli cluster. These are not shared with on/off switches.
* Some of the descriptions, max, min or value properties may be overridden for each device
*/
const COMMON_DIMMER_ATTRIBUTES = {
...COMMON_ATTRIBUTES,
minimumLevel: {
ID: 9,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 1,
max: 254,
description: "The minimum level that the dimmer allows the bulb to be dimmed to. " +
"Useful when the user has an LED bulb that does not turn on or flickers at a lower level.",
},
maximumLevel: {
ID: 10,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 2,
max: 255,
description: "The maximum level that the dimmer allows the bulb to be dimmed to." +
"Useful when the user has an LED bulb that reaches its maximum level before the " +
"dimmer value of 99 or when the user wants to limit the maximum brightness.",
},
powerType: {
ID: 21,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { "Non Neutral": 0, Neutral: 1 },
min: 0,
max: 1,
readOnly: true,
description: "Set the power type for the device.",
},
outputMode: {
ID: 258,
min: 0,
max: 1,
values: { Dimmer: 0, "On/Off": 1 },
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
description: "Use device as a Dimmer or an On/Off switch.",
displayType: "enum",
},
};
/**
* Common Dimmable light Attributes
*
* These attributes are shared between all devices that are dimmable light switches with
* the manufacturer specific Inovelli cluster. These are not shared with fans or on/off switches.
* Some of the descriptions, max, min or value properties may be overridden for each device
*/
const COMMON_DIMMABLE_LIGHT_ATTRIBUTES = {
quickStartTime: {
ID: 23,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 60,
description: "Duration of full power output while lamp transitions from Off to On. In 60th of second. 0 = disable, 1 = 1/60s, 60 = 1s",
},
quickStartLevel: {
ID: 24,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 1,
max: 254,
description: "Level of power output during Quick Start Light time (P23).",
},
higherOutputInNonNeutral: {
ID: 25,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { "Disabled (default)": 0, Enabled: 1 },
min: 0,
max: 1,
description: "Increase level in non-neutral mode",
},
dimmingMode: {
ID: 26,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
displayType: "enum",
values: { "Leading edge": 0, "Trailing edge": 1 },
min: 0,
max: 1,
readOnly: true,
description: "Switches the dimming mode from leading edge (default) to trailing edge. " +
"1. Trailing Edge is only available on neutral single-pole and neutral multi-way with an " +
"aux/add-on switch (multi-way with a dumb/existing switch and non-neutral setups are not supported and " +
"will default back to Leading Edge). This parameter can only be changed at the switch.",
},
};
/**
* Common Dimmer or On/Off Attributes
*
* These attributes are shared between all devices that are light switches (either dimmers or on/off) with
* the manufacturer specific Inovelli cluster. These are not shared with fans.
* Some of the descriptions, max, min or value properties may be overridden for each device
*/
const COMMON_DIMMER_ON_OFF_ATTRIBUTES = {
ledBarScaling: {
ID: 100,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
displayType: "enum",
values: { "Gen3 method (VZM-style)": 0, "Gen2 method (LZW-style)": 1 },
description: "Method used for scaling.",
},
activePowerReports: {
ID: 18,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
min: 0,
max: 100,
description: "Percent power level change that will result in a new power report being sent. 0 = Disabled",
},
periodicPowerAndEnergyReports: {
ID: 19,
min: 0,
max: 32767,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT16,
description: "Time period between consecutive power & energy reports being sent (in seconds). The timer is reset after each report is sent.",
},
activeEnergyReports: {
ID: 20,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT16,
min: 0,
max: 32767,
description: "Energy reports Energy level change which will result in sending a new energy report." +
"0 = disabled, 1-32767 = 0.01kWh-327.67kWh. Default setting: 10 (0.1 kWh)",
},
};
const VZM30_ATTRIBUTES = {
...COMMON_ATTRIBUTES,
...COMMON_DIMMER_ON_OFF_ATTRIBUTES,
switchType: {
...COMMON_ATTRIBUTES.switchType,
values: { "Single Pole": 0, "Aux Switch": 1 },
max: 1,
},
outputMode: {
...COMMON_DIMMER_ATTRIBUTES.outputMode,
description: "Use device as a Dimmer or an On/Off switch. Only applies when controlling bound devices.",
},
};
const VZM31_ATTRIBUTES = {
// Temporarily exclude fanTimerMode from the VZM31. While the specifications indicate that this attribute should be present, it's missing in the current firmware (2.18). This can be removed once the firmware bug is corrected.
...Object.fromEntries(Object.entries(COMMON_DIMMER_ATTRIBUTES).filter(([key]) => key !== "fanTimerMode")),
...COMMON_DIMMER_ON_OFF_ATTRIBUTES,
...COMMON_DIMMABLE_LIGHT_ATTRIBUTES,
relayClick: {
ID: 261,
dataType: zigbee_herdsman_1.Zcl.DataType.BOOLEAN,
min: 0,
max: 1,
description: "In neutral on/off setups, the default is to have a clicking sound to notify you that the relay " +
"is open or closed. You may disable this sound by creating a, “simulated” on/off where the switch " +
"only will turn onto 100 or off to 0.",
values: { "Disabled (Click Sound On)": 0, "Enabled (Click Sound Off)": 1 },
displayType: "enum",
},
};
const VZM32_ATTRIBUTES = {
...COMMON_DIMMER_ATTRIBUTES,
...COMMON_DIMMER_ON_OFF_ATTRIBUTES,
...COMMON_DIMMABLE_LIGHT_ATTRIBUTES,
switchType: {
...COMMON_ATTRIBUTES.switchType,
values: { "Single Pole": 0, "Aux Switch": 1 },
max: 1,
},
otaImageType: {
ID: 34,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
displayType: "enum",
values: {
"Zigbee (259)": 0,
"mmWave (260)": 1,
"Alternating (259 & 260) (default)": 2,
},
min: 0,
max: 2,
description: "Which endpoint should the switch advertise for OTA update (Zigbee, mmWave, or both).",
},
mmwaveControlWiredDevice: {
ID: 110,
dataType: zigbee_herdsman_1.Zcl.DataType.UINT8,
displayType: "enum",
values: {
Disabled: 0,
"Occupancy (default)": 1,
Vacancy: 2,
"Wasteful Occupancy": 3,
"Mirrored Occupancy": 4,
"Mirrored Vacancy": 5,
"Mirrored Wasteful Occupancy": 6,
},
min: 0,
max: 6,
description: "Controls whether the wired load is automatically turned on / off by the presence detector. " +
"0 = Disabled (manual control of the load), " +
"1 = Occupancy (default; turn on automatically with presence; turn off automatically without presence), " +
"2 = Vacancy (does not turn on automatically; turn off automatically without presence), " +
"3 = Wasteful Occupancy (turn on automatically with presence; does not turn off automatically), " +
"4 = Mirrored Occupancy (turn on automatically without presence; turn off automatically with presence), " +
"5 = Mirrored Vacancy (turn on automatical