Update availability transformation pattern
This commit is contained in:
@@ -181,7 +181,8 @@ export class Z2MAdapter extends Adapter<Z2MConfig> {
|
|||||||
configuration: {
|
configuration: {
|
||||||
availabilityTopic: `${thingTopic}/availability`,
|
availabilityTopic: `${thingTopic}/availability`,
|
||||||
payloadNotAvailable: "offline",
|
payloadNotAvailable: "offline",
|
||||||
payloadAvailable: "online"
|
payloadAvailable: "online",
|
||||||
|
transformationPattern: ["JSONPATH($.state)"]
|
||||||
},
|
},
|
||||||
properties: {},
|
properties: {},
|
||||||
channels: [...exposes, ...options]
|
channels: [...exposes, ...options]
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ export type ThingConfig = {
|
|||||||
availabilityTopic: string;
|
availabilityTopic: string;
|
||||||
payloadNotAvailable: string;
|
payloadNotAvailable: string;
|
||||||
payloadAvailable: string;
|
payloadAvailable: string;
|
||||||
|
transformationPattern: string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Channel = {
|
export type Channel = {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
/* Language and Environment */
|
/* Language and Environment */
|
||||||
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
"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. */
|
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
||||||
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
||||||
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
||||||
|
|||||||
Reference in New Issue
Block a user