zigbee-herdsman-converters 25.107.0 → 25.108.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ import type { DefinitionWithExtend } from "../lib/types";
2
+ export declare const definitions: DefinitionWithExtend[];
3
+ //# sourceMappingURL=zunzunbee.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zunzunbee.d.ts","sourceRoot":"","sources":["../../src/devices/zunzunbee.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,oBAAoB,EAAK,MAAM,cAAc,CAAC;AAgC3D,eAAO,MAAM,WAAW,EAAE,oBAAoB,EA6B7C,CAAC"}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.definitions = void 0;
37
+ const exposes = __importStar(require("../lib/exposes"));
38
+ const m = __importStar(require("../lib/modernExtend"));
39
+ const utils = __importStar(require("../lib/utils"));
40
+ const e = exposes.presets;
41
+ const fzLocal = {
42
+ fzZunzunbeeSlateSwitchIAS: {
43
+ cluster: "ssIasZone",
44
+ type: ["attributeReport", "readResponse", "commandStatusChangeNotification"],
45
+ convert: (model, msg, publish, options, meta) => {
46
+ let zoneStatus;
47
+ if ("zoneStatus" in msg.data) {
48
+ zoneStatus = msg.data.zoneStatus;
49
+ }
50
+ else if ("zonestatus" in msg.data) {
51
+ zoneStatus = msg.data.zonestatus;
52
+ }
53
+ else {
54
+ return;
55
+ }
56
+ // Bit0 encodes press type
57
+ const pressType = zoneStatus & 0x0001 ? "long_press" : "short_press";
58
+ // Bits 1..8 encode button number (2..256)
59
+ const masked = zoneStatus & 0x01fe;
60
+ const map = { 2: 1, 4: 2, 8: 3, 16: 4, 32: 5, 64: 6, 128: 7, 256: 8 };
61
+ if (masked in map) {
62
+ return { action: `button_${utils.getFromLookup(masked, map)}_${pressType}` };
63
+ }
64
+ },
65
+ },
66
+ };
67
+ exports.definitions = [
68
+ {
69
+ fingerprint: [{ manufacturerName: "zunzunbee", modelID: "SSWZ8T" }],
70
+ model: "SSWZ8T",
71
+ vendor: "zunzunbee",
72
+ description: "Slate switch (8-button touch controller)",
73
+ fromZigbee: [fzLocal.fzZunzunbeeSlateSwitchIAS],
74
+ exposes: [
75
+ e.action([
76
+ "button_1_short_press",
77
+ "button_1_long_press",
78
+ "button_2_short_press",
79
+ "button_2_long_press",
80
+ "button_3_short_press",
81
+ "button_3_long_press",
82
+ "button_4_short_press",
83
+ "button_4_long_press",
84
+ "button_5_short_press",
85
+ "button_5_long_press",
86
+ "button_6_short_press",
87
+ "button_6_long_press",
88
+ "button_7_short_press",
89
+ "button_7_long_press",
90
+ "button_8_short_press",
91
+ "button_8_long_press",
92
+ ]),
93
+ ],
94
+ extend: [m.battery(), m.temperature()],
95
+ },
96
+ ];
97
+ //# sourceMappingURL=zunzunbee.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zunzunbee.js","sourceRoot":"","sources":["../../src/devices/zunzunbee.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAA0C;AAC1C,uDAAyC;AAEzC,oDAAsC;AAEtC,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;AAE1B,MAAM,OAAO,GAAG;IACZ,yBAAyB,EAAE;QACvB,OAAO,EAAE,WAAW;QACpB,IAAI,EAAE,CAAC,iBAAiB,EAAE,cAAc,EAAE,iCAAiC,CAAC;QAC5E,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;YAC5C,IAAI,UAAkB,CAAC;YACvB,IAAI,YAAY,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;gBAC3B,UAAU,GAAG,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;YACrC,CAAC;iBAAM,IAAI,YAAY,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;gBAClC,UAAU,GAAG,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;YACrC,CAAC;iBAAM,CAAC;gBACJ,OAAO;YACX,CAAC;YAED,0BAA0B;YAC1B,MAAM,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC;YAErE,0CAA0C;YAC1C,MAAM,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;YACnC,MAAM,GAAG,GAAG,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAA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