zigbee-herdsman-converters
Version:
Collection of device converters to be used with zigbee-herdsman
775 lines • 40.9 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 exposes = __importStar(require("../lib/exposes"));
const tuya = __importStar(require("../lib/tuya"));
const e = exposes.presets;
const ea = exposes.access;
exports.definitions = [
{
fingerprint: tuya.fingerprint("TS0601", ["_TZE284_7qc2wlqr"]),
model: "BL82-TYZ1",
vendor: "Manhot",
description: "Cover motor LPD",
extend: [tuya.modernExtend.tuyaBase({ dp: true, respondToMcuVersionResponse: true })],
exposes: [
e.battery(),
e.cover_position().setAccess("position", ea.STATE_SET),
e.enum("motor_direction", ea.STATE_SET, ["normal", "reversed"]).withDescription("Motor Steering"),
e.binary("auto_power", ea.STATE_SET, "ON", "OFF").withDescription("Manual pull, automatic run"),
],
meta: {
tuyaDatapoints: [
[
1,
"state",
tuya.valueConverterBasic.lookup({
OPEN: tuya.enum(0),
STOP: tuya.enum(1),
CLOSE: tuya.enum(2),
}),
],
[],
[],
[
5,
"motor_direction",
tuya.valueConverterBasic.lookup({
normal: tuya.enum(0),
reversed: tuya.enum(1),
}),
],
[],
[],
],
},
},
{
fingerprint: tuya.fingerprint("TS0601", ["_TZE284_ncc7uahd"]),
model: "MH03-1Z-OLED",
vendor: "Manhot",
description: "OLED Screen Switch 1 Gang",
extend: [tuya.modernExtend.tuyaBase({ dp: true, respondToMcuVersionResponse: true })],
exposes: [
e.switch().withEndpoint("l1"),
e.numeric("countdown_1", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 1"),
e.binary("child_lock", ea.STATE_SET, "ON", "OFF").withDescription("Child lock"),
e.binary("backlight_switch", ea.STATE_SET, "ON", "OFF").withDescription("Backlight switch"),
e.numeric("backlight_lightness", ea.STATE_SET).withValueMin(1).withValueMax(100).withDescription("Backlight brightness %"),
e.numeric("displayoff_delay", ea.STATE_SET).withValueMin(10).withValueMax(180).withUnit("s").withDescription("Screen off delay"),
e.enum("relay_status", ea.STATE_SET, ["off", "on", "memory"]).withDescription("Power-on state"),
e.enum("light_mode", ea.STATE_SET, ["none", "relay", "pos"]).withDescription("Indicator light state"),
e
.enum("on_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-on color"),
e
.enum("off_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-off color"),
e.text("sw1_name", ea.STATE_SET).withDescription("Set switch 1 name"),
],
meta: {
multiEndpoint: true,
tuyaDatapoints: [
[],
[],
[],
[],
[],
[],
[
102,
"on_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[
103,
"off_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[],
[],
[],
],
},
},
{
fingerprint: tuya.fingerprint("TS0601", ["_TZE284_dnhhp8ew"]),
model: "MH03-2Z-OLED",
vendor: "Manhot",
description: "OLED Screen Switch 2 Gang",
extend: [tuya.modernExtend.tuyaBase({ dp: true, respondToMcuVersionResponse: true })],
exposes: [
e.switch().withEndpoint("l1"),
e.switch().withEndpoint("l2"),
e.numeric("countdown_1", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 1"),
e.numeric("countdown_2", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 2"),
e.binary("child_lock", ea.STATE_SET, "ON", "OFF").withDescription("Child lock"),
e.binary("backlight_switch", ea.STATE_SET, "ON", "OFF").withDescription("Backlight switch"),
e.numeric("backlight_lightness", ea.STATE_SET).withValueMin(1).withValueMax(100).withDescription("Backlight brightness %"),
e.numeric("displayoff_delay", ea.STATE_SET).withValueMin(10).withValueMax(180).withUnit("s").withDescription("Screen off delay"),
e.enum("relay_status", ea.STATE_SET, ["off", "on", "memory"]).withDescription("Power-on state"),
e.enum("light_mode", ea.STATE_SET, ["none", "relay", "pos"]).withDescription("Indicator light state"),
e
.enum("on_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-on color"),
e
.enum("off_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-off color"),
e.text("sw1_name", ea.STATE_SET).withDescription("Set switch 1 name"),
e.text("sw2_name", ea.STATE_SET).withDescription("Set switch 2 name"),
e.enum("press_on_fun", ea.STATE_SET, ["disable", "press_switch_1", "press_switch_2"]).withDescription("Long press all on channel"),
e.enum("press_off_fun", ea.STATE_SET, ["disable", "press_switch_1", "press_switch_2"]).withDescription("Long press all off channel"),
],
meta: {
multiEndpoint: true,
tuyaDatapoints: [
[],
[],
[],
[],
[],
[],
[],
[],
[
102,
"on_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[
103,
"off_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[],
[],
[],
[],
[
118,
"press_on_fun",
tuya.valueConverterBasic.lookup({
disable: tuya.enum(0),
press_switch_1: tuya.enum(1),
press_switch_2: tuya.enum(2),
}),
],
[
119,
"press_off_fun",
tuya.valueConverterBasic.lookup({
disable: tuya.enum(0),
press_switch_1: tuya.enum(1),
press_switch_2: tuya.enum(2),
}),
],
],
},
},
{
fingerprint: tuya.fingerprint("TS0601", ["_TZE284_59dz7ioi"]),
model: "MH03-3Z-OLED",
vendor: "Manhot",
description: "OLED Screen Switch 3 Gang",
extend: [tuya.modernExtend.tuyaBase({ dp: true, respondToMcuVersionResponse: true })],
exposes: [
e.switch().withEndpoint("l1"),
e.switch().withEndpoint("l2"),
e.switch().withEndpoint("l3"),
e.numeric("countdown_1", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 1"),
e.numeric("countdown_2", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 2"),
e.numeric("countdown_3", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 3"),
e.binary("child_lock", ea.STATE_SET, "ON", "OFF").withDescription("Child lock"),
e.binary("backlight_switch", ea.STATE_SET, "ON", "OFF").withDescription("Backlight switch"),
e.numeric("backlight_lightness", ea.STATE_SET).withValueMin(1).withValueMax(100).withDescription("Backlight brightness %"),
e.numeric("displayoff_delay", ea.STATE_SET).withValueMin(10).withValueMax(180).withUnit("s").withDescription("Screen off delay"),
e.enum("relay_status", ea.STATE_SET, ["off", "on", "memory"]).withDescription("Power-on state"),
e.enum("light_mode", ea.STATE_SET, ["none", "relay", "pos"]).withDescription("Indicator light state"),
e
.enum("on_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-on color"),
e
.enum("off_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-off color"),
e.text("sw1_name", ea.STATE_SET).withDescription("Set switch 1 name"),
e.text("sw2_name", ea.STATE_SET).withDescription("Set switch 2 name"),
e.text("sw3_name", ea.STATE_SET).withDescription("Set switch 3 name"),
e
.enum("press_on_fun", ea.STATE_SET, ["disable", "press_switch_1", "press_switch_2", "press_switch_3"])
.withDescription("Long press all on channel"),
e
.enum("press_off_fun", ea.STATE_SET, ["disable", "press_switch_1", "press_switch_2", "press_switch_3"])
.withDescription("Long press all off channel"),
],
meta: {
multiEndpoint: true,
tuyaDatapoints: [
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[
102,
"on_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[
103,
"off_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[],
[],
[],
[],
[],
[
118,
"press_on_fun",
tuya.valueConverterBasic.lookup({
disable: tuya.enum(0),
press_switch_1: tuya.enum(1),
press_switch_2: tuya.enum(2),
press_switch_3: tuya.enum(3),
}),
],
[
119,
"press_off_fun",
tuya.valueConverterBasic.lookup({
disable: tuya.enum(0),
press_switch_1: tuya.enum(1),
press_switch_2: tuya.enum(2),
press_switch_3: tuya.enum(3),
}),
],
],
},
},
{
fingerprint: tuya.fingerprint("TS0601", ["_TZE284_esnu2jxv"]),
model: "MH03-4Z-OLED",
vendor: "Manhot",
description: "OLED Screen Switch 4 Gang",
extend: [tuya.modernExtend.tuyaBase({ dp: true, respondToMcuVersionResponse: true })],
exposes: [
e.switch().withEndpoint("l1"),
e.switch().withEndpoint("l2"),
e.switch().withEndpoint("l3"),
e.switch().withEndpoint("l4"),
e.numeric("countdown_1", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 1"),
e.numeric("countdown_2", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 2"),
e.numeric("countdown_3", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 3"),
e.numeric("countdown_4", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 4"),
e.binary("child_lock", ea.STATE_SET, "ON", "OFF").withDescription("Child lock"),
e.binary("backlight_switch", ea.STATE_SET, "ON", "OFF").withDescription("Backlight switch"),
e.numeric("backlight_lightness", ea.STATE_SET).withValueMin(1).withValueMax(100).withDescription("Backlight brightness %"),
e.numeric("displayoff_delay", ea.STATE_SET).withValueMin(10).withValueMax(180).withUnit("s").withDescription("Screen off delay"),
e.enum("relay_status", ea.STATE_SET, ["off", "on", "memory"]).withDescription("Power-on state"),
e.enum("light_mode", ea.STATE_SET, ["none", "relay", "pos"]).withDescription("Indicator light state"),
e
.enum("on_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-on color"),
e
.enum("off_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-off color"),
e.text("sw1_name", ea.STATE_SET).withDescription("Set switch 1 name"),
e.text("sw2_name", ea.STATE_SET).withDescription("Set switch 2 name"),
e.text("sw3_name", ea.STATE_SET).withDescription("Set switch 3 name"),
e.text("sw4_name", ea.STATE_SET).withDescription("Set switch 4 name"),
e
.enum("press_on_fun", ea.STATE_SET, ["disable", "press_switch_1", "press_switch_2", "press_switch_3", "press_switch_4"])
.withDescription("Long press all on channel"),
e
.enum("press_off_fun", ea.STATE_SET, ["disable", "press_switch_1", "press_switch_2", "press_switch_3", "press_switch_4"])
.withDescription("Long press all off channel"),
],
meta: {
multiEndpoint: true,
tuyaDatapoints: [
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[
102,
"on_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[
103,
"off_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[],
[],
[],
[],
[],
[],
[
118,
"press_on_fun",
tuya.valueConverterBasic.lookup({
disable: tuya.enum(0),
press_switch_1: tuya.enum(1),
press_switch_2: tuya.enum(2),
press_switch_3: tuya.enum(3),
press_switch_4: tuya.enum(4),
}),
],
[
119,
"press_off_fun",
tuya.valueConverterBasic.lookup({
disable: tuya.enum(0),
press_switch_1: tuya.enum(1),
press_switch_2: tuya.enum(2),
press_switch_3: tuya.enum(3),
press_switch_4: tuya.enum(4),
}),
],
],
},
},
{
fingerprint: tuya.fingerprint("TS0601", ["_TZE284_zykra2yj"]),
model: "MH03-6Z-OLED",
vendor: "Manhot",
description: "OLED Screen Switch 6 Gang",
extend: [tuya.modernExtend.tuyaBase({ dp: true, respondToMcuVersionResponse: true })],
exposes: [
e.switch().withEndpoint("l1"),
e.switch().withEndpoint("l2"),
e.switch().withEndpoint("l3"),
e.switch().withEndpoint("l4"),
e.switch().withEndpoint("l5"),
e.switch().withEndpoint("l6"),
e.numeric("countdown_1", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 1"),
e.numeric("countdown_2", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 2"),
e.numeric("countdown_3", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 3"),
e.numeric("countdown_4", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 4"),
e.numeric("countdown_5", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 5"),
e.numeric("countdown_6", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 6"),
e.binary("child_lock", ea.STATE_SET, "ON", "OFF").withDescription("Child lock"),
e.binary("backlight_switch", ea.STATE_SET, "ON", "OFF").withDescription("Backlight switch"),
e.numeric("backlight_lightness", ea.STATE_SET).withValueMin(1).withValueMax(100).withDescription("Backlight brightness %"),
e.numeric("displayoff_delay", ea.STATE_SET).withValueMin(10).withValueMax(180).withUnit("s").withDescription("Screen off delay"),
e.enum("relay_status", ea.STATE_SET, ["off", "on", "memory"]).withDescription("Power-on state"),
e.enum("light_mode", ea.STATE_SET, ["none", "relay", "pos"]).withDescription("Indicator light state"),
e
.enum("on_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-on color"),
e
.enum("off_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-off color"),
e.text("sw1_name", ea.STATE_SET).withDescription("Set switch 1 name"),
e.text("sw2_name", ea.STATE_SET).withDescription("Set switch 2 name"),
e.text("sw3_name", ea.STATE_SET).withDescription("Set switch 3 name"),
e.text("sw4_name", ea.STATE_SET).withDescription("Set switch 4 name"),
e.text("sw5_name", ea.STATE_SET).withDescription("Set switch 5 name"),
e.text("sw6_name", ea.STATE_SET).withDescription("Set switch 6 name"),
e
.enum("press_on_fun", ea.STATE_SET, [
"disable",
"press_switch_1",
"press_switch_2",
"press_switch_3",
"press_switch_4",
"press_switch_5",
"press_switch_6",
])
.withDescription("Long press all on channel"),
e
.enum("press_off_fun", ea.STATE_SET, [
"disable",
"press_switch_1",
"press_switch_2",
"press_switch_3",
"press_switch_4",
"press_switch_5",
"press_switch_6",
])
.withDescription("Long press all off channel"),
],
meta: {
multiEndpoint: true,
tuyaDatapoints: [
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[
102,
"on_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[
103,
"off_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[],
[],
[],
[],
[],
[],
[],
[],
[
118,
"press_on_fun",
tuya.valueConverterBasic.lookup({
disable: tuya.enum(0),
press_switch_1: tuya.enum(1),
press_switch_2: tuya.enum(2),
press_switch_3: tuya.enum(3),
press_switch_4: tuya.enum(4),
press_switch_5: tuya.enum(5),
press_switch_6: tuya.enum(6),
}),
],
[
119,
"press_off_fun",
tuya.valueConverterBasic.lookup({
disable: tuya.enum(0),
press_switch_1: tuya.enum(1),
press_switch_2: tuya.enum(2),
press_switch_3: tuya.enum(3),
press_switch_4: tuya.enum(4),
press_switch_5: tuya.enum(5),
press_switch_6: tuya.enum(6),
}),
],
],
},
},
{
fingerprint: tuya.fingerprint("TS0601", ["_TZE284_hwv3by9k"]),
model: "MH03-8Z-OLED",
vendor: "Manhot",
description: "OLED Screen Switch 8 Gang",
extend: [tuya.modernExtend.tuyaBase({ dp: true, respondToMcuVersionResponse: true })],
exposes: [
e.switch().withEndpoint("l1"),
e.switch().withEndpoint("l2"),
e.switch().withEndpoint("l3"),
e.switch().withEndpoint("l4"),
e.switch().withEndpoint("l5"),
e.switch().withEndpoint("l6"),
e.switch().withEndpoint("l7"),
e.switch().withEndpoint("l8"),
e.numeric("countdown_1", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 1"),
e.numeric("countdown_2", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 2"),
e.numeric("countdown_3", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 3"),
e.numeric("countdown_4", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 4"),
e.numeric("countdown_5", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 5"),
e.numeric("countdown_6", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 6"),
e.numeric("countdown_7", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 7"),
e.numeric("countdown_8", ea.STATE_SET).withValueMin(0).withValueMax(43200).withUnit("s").withDescription("Timer for switch 8"),
e.binary("child_lock", ea.STATE_SET, "ON", "OFF").withDescription("Child lock"),
e.binary("backlight_switch", ea.STATE_SET, "ON", "OFF").withDescription("Backlight switch"),
e.numeric("backlight_lightness", ea.STATE_SET).withValueMin(1).withValueMax(100).withDescription("Backlight brightness %"),
e.numeric("displayoff_delay", ea.STATE_SET).withValueMin(10).withValueMax(180).withUnit("s").withDescription("Screen off delay"),
e.enum("relay_status", ea.STATE_SET, ["off", "on", "memory"]).withDescription("Power-on state"),
e.enum("light_mode", ea.STATE_SET, ["none", "relay", "pos"]).withDescription("Indicator light state"),
e
.enum("on_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-on color"),
e
.enum("off_color", ea.STATE_SET, ["red", "orange", "green", "cyan", "blue", "purple", "magenta", "cold_white", "warm_yellow"])
.withDescription("Light-off color"),
e.text("sw1_name", ea.STATE_SET).withDescription("Set switch 1 name"),
e.text("sw2_name", ea.STATE_SET).withDescription("Set switch 2 name"),
e.text("sw3_name", ea.STATE_SET).withDescription("Set switch 3 name"),
e.text("sw4_name", ea.STATE_SET).withDescription("Set switch 4 name"),
e.text("sw5_name", ea.STATE_SET).withDescription("Set switch 5 name"),
e.text("sw6_name", ea.STATE_SET).withDescription("Set switch 6 name"),
e.text("sw7_name", ea.STATE_SET).withDescription("Set switch 7 name"),
e.text("sw8_name", ea.STATE_SET).withDescription("Set switch 8 name"),
e
.enum("press_on_fun", ea.STATE_SET, [
"disable",
"press_switch_1",
"press_switch_2",
"press_switch_3",
"press_switch_4",
"press_switch_5",
"press_switch_6",
"press_switch_7",
"press_switch_8",
])
.withDescription("Long press all on channel"),
e
.enum("press_off_fun", ea.STATE_SET, [
"disable",
"press_switch_1",
"press_switch_2",
"press_switch_3",
"press_switch_4",
"press_switch_5",
"press_switch_6",
"press_switch_7",
"press_switch_8",
])
.withDescription("Long press all off channel"),
],
meta: {
multiEndpoint: true,
tuyaDatapoints: [
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[
102,
"on_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[
103,
"off_color",
tuya.valueConverterBasic.lookup({
red: tuya.enum(0),
orange: tuya.enum(1),
green: tuya.enum(2),
cyan: tuya.enum(3),
blue: tuya.enum(4),
purple: tuya.enum(5),
magenta: tuya.enum(6),
cold_white: tuya.enum(7),
warm_yellow: tuya.enum(8),
}),
],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[
118,
"press_on_fun",
tuya.valueConverterBasic.lookup({
disable: tuya.enum(0),
press_switch_1: tuya.enum(1),
press_switch_2: tuya.enum(2),
press_switch_3: tuya.enum(3),
press_switch_4: tuya.enum(4),
press_switch_5: tuya.enum(5),
press_switch_6: tuya.enum(6),
press_switch_7: tuya.enum(7),
press_switch_8: tuya.enum(8),
}),
],
[
119,
"press_off_fun",
tuya.valueConverterBasic.lookup({
disable: tuya.enum(0),
press_switch_1: tuya.enum(1),
press_switch_2: tuya.enum(2),
press_switch_3: tuya.enum(3),
press_switch_4: tuya.enum(4),
press_switch_5: tuya.enum(5),
press_switch_6: tuya.enum(6),
press_switch_7: tuya.enum(7),
press_switch_8: tuya.enum(8),
}),
],
],
},
},
];
//# sourceMappingURL=manhot.js.map