Skip to content

Commit

Permalink
Merge pull request #4992 from weichou1229/on-change-threshold
Browse files Browse the repository at this point in the history
docs: Add onChangeThreshold in Device AutoEvent
  • Loading branch information
cloudxxx8 authored Nov 4, 2024
2 parents 9b17baf + 941e1e5 commit 4706abc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openapi/core-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ components:
onChange:
type: boolean
description: OnChange indicates whether the device service will generate an event only, if the reading value is different from the previous one. If true, only generate events when readings change
onChangeThreshold:
type: number
description: OnChangeThreshold indicates any changed value that exceeds the threshold shall be generated new event if `onChange` is true, this feature only applies to the numeric reading. Available value types are `Uint8`, `Uint16`, `Uint32`, `Uint64`, `Int8`, `Int16`, `Int32`, `Int64`, `Float32`, `Float64`. The default value is 0.
sourceName:
type: string
description: SourceName indicates the name of the resource or device command in the device profile which describes the event to generate
Expand Down Expand Up @@ -1315,6 +1318,7 @@ components:
autoEvents:
- interval: 300ms
onChange: true
onChangeThreshold: 0.01
sourceName: CurrentHumidity
protocols:
modbus-tcp:
Expand Down Expand Up @@ -1348,6 +1352,7 @@ components:
autoEvents:
- interval: "100ms"
onChange: true
onChangeThreshold: 0.01
sourceName: "CurrentHumidity"
- apiVersion: v3
device:
Expand Down

0 comments on commit 4706abc

Please sign in to comment.