Update availability transformation pattern

This commit is contained in:
2025-12-22 00:27:49 +01:00
parent 2166490e2d
commit dd47e3d9b3
3 changed files with 4 additions and 2 deletions

View File

@@ -181,7 +181,8 @@ export class Z2MAdapter extends Adapter<Z2MConfig> {
configuration: {
availabilityTopic: `${thingTopic}/availability`,
payloadNotAvailable: "offline",
payloadAvailable: "online"
payloadAvailable: "online",
transformationPattern: ["JSONPATH($.state)"]
},
properties: {},
channels: [...exposes, ...options]

View File

@@ -19,6 +19,7 @@ export type ThingConfig = {
availabilityTopic: string;
payloadNotAvailable: string;
payloadAvailable: string;
transformationPattern: string[];
};
export type Channel = {

View File

@@ -12,7 +12,7 @@
/* Language and Environment */
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
"lib": ["es2019"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */