@zwave-js/cc
Advanced tools
Comparing version 11.14.0 to 11.14.3
@@ -334,2 +334,5 @@ /// <reference types="node" /> | ||
} | ||
export declare function getNotificationEnumBehavior(notificationConfig: Notification, valueConfig: NotificationValueDefinition & { | ||
type: "state"; | ||
}): "none" | "extend" | "replace"; | ||
export declare function getNotificationStateValueWithEnum(stateValue: number, enumValue: number): number; | ||
@@ -336,0 +339,0 @@ /** |
@@ -33,3 +33,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.NotificationCCEventSupportedGet = exports.NotificationCCEventSupportedReport = exports.NotificationCCSupportedGet = exports.NotificationCCSupportedReport = exports.NotificationCCGet = exports.NotificationCCReport = exports.NotificationCCSet = exports.NotificationCC = exports.getNotificationValueMetadata = exports.getNotificationStateValueWithEnum = exports.NotificationCCAPI = exports.NotificationCCValues = void 0; | ||
exports.NotificationCCEventSupportedGet = exports.NotificationCCEventSupportedReport = exports.NotificationCCSupportedGet = exports.NotificationCCSupportedReport = exports.NotificationCCGet = exports.NotificationCCReport = exports.NotificationCCSet = exports.NotificationCC = exports.getNotificationValueMetadata = exports.getNotificationStateValueWithEnum = exports.getNotificationEnumBehavior = exports.NotificationCCAPI = exports.NotificationCCValues = void 0; | ||
function __assertType(argName, typeName, boundHasError) { | ||
@@ -392,2 +392,3 @@ const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core"); | ||
} | ||
exports.getNotificationEnumBehavior = getNotificationEnumBehavior; | ||
function getNotificationStateValueWithEnum(stateValue, enumValue) { | ||
@@ -420,3 +421,6 @@ return (stateValue << 8) | enumValue; | ||
for (const [value, label] of valueConfig.parameter.values) { | ||
metadata.states[getNotificationStateValueWithEnum(valueConfig.value, value)] = label; | ||
const stateKey = enumBehavior === "replace" | ||
? value | ||
: getNotificationStateValueWithEnum(valueConfig.value, value); | ||
metadata.states[stateKey] = label; | ||
} | ||
@@ -423,0 +427,0 @@ } |
{ | ||
"name": "@zwave-js/cc", | ||
"version": "11.14.0", | ||
"version": "11.14.3", | ||
"description": "zwave-js: Command Classes", | ||
@@ -65,4 +65,4 @@ "keywords": [], | ||
"@zwave-js/core": "11.14.0", | ||
"@zwave-js/host": "11.14.0", | ||
"@zwave-js/serial": "11.14.0", | ||
"@zwave-js/host": "11.14.3", | ||
"@zwave-js/serial": "11.14.3", | ||
"@zwave-js/shared": "11.13.1", | ||
@@ -78,3 +78,3 @@ "alcalzone-shared": "^4.0.8", | ||
"@zwave-js/maintenance": "11.14.0", | ||
"@zwave-js/testing": "11.14.0", | ||
"@zwave-js/testing": "11.14.3", | ||
"@zwave-js/transformers": "11.13.1", | ||
@@ -81,0 +81,0 @@ "ava": "^4.3.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
4160600
57981
+ Added@zwave-js/config@11.14.3(transitive)
+ Added@zwave-js/host@11.14.3(transitive)
+ Added@zwave-js/serial@11.14.3(transitive)
- Removed@zwave-js/config@11.14.0(transitive)
- Removed@zwave-js/host@11.14.0(transitive)
- Removed@zwave-js/serial@11.14.0(transitive)
Updated@zwave-js/host@11.14.3
Updated@zwave-js/serial@11.14.3