Skip to content

Commit

Permalink
Change contactState values to lowercase (#848)
Browse files Browse the repository at this point in the history
* Change contactState to lowercase values

* Update codecs
  • Loading branch information
KrishnaIyer authored Nov 19, 2024
1 parent a084a19 commit 4bdce9f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
"contactState": {
"type": "string",
"description": "State of a contact sensor",
"enum": ["OPEN", "CLOSED"]
"enum": ["open", "closed"]
}
},
"additionalProperties": false
Expand Down
2 changes: 1 addition & 1 deletion vendor/dragino/lsn50-v2-codec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ uplinkDecoder:
temperature: 25.2
relativeHumidity: 51.7
action:
contactState: 'OPEN'
contactState: 'open'
battery: 2.9

- description: Unknown FPort
Expand Down
2 changes: 1 addition & 1 deletion vendor/dragino/lsn50-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function normalizeUplink(input) {
relativeHumidity: input.data.Hum_SHT,
},
action: {
contactState: input.data.Door_status === "CLOSE" ? "CLOSED" : input.data.Door_status === "OPEN" ? "OPEN" : undefined
contactState: input.data.Door_status === "CLOSE" ? "closed" : input.data.Door_status === "OPEN" ? "open" : undefined
},
battery: input.data.BatV,
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/dragino/lsn50v2-s31-codec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ uplinkDecoder:
temperature: 25.2
relativeHumidity: 51.7
action:
contactState: 'OPEN'
contactState: 'open'
battery: 2.9
- description: Unknown FPort
input:
Expand Down
2 changes: 1 addition & 1 deletion vendor/dragino/lsn50v2-s31.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function normalizeUplink(input) {
relativeHumidity: input.data.Hum_SHT
},
action: {
contactState: input.data.Door_status === "CLOSE" ? "CLOSED" : input.data.Door_status === "OPEN" ? "OPEN" : undefined
contactState: input.data.Door_status === "CLOSE" ? "closed" : input.data.Door_status === "OPEN" ? "open" : undefined
},
battery: input.data.BatV,
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/milesight-iot/ws301-codec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ uplinkDecoder:
normalizedOutput:
data:
- action:
contactState: 'OPEN'
contactState: 'open'
battery: 75
- description: Magnetic Contact Switch (example 2) - Milesight IoT
input:
Expand Down
2 changes: 1 addition & 1 deletion vendor/milesight-iot/ws301.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function normalizeUplink(input) {
return {
data: {
action: {
contactState: input.data.door === "close" ? "CLOSED" : input.data.door === "open" ? "OPEN" : undefined
contactState: input.data.door === "close" ? "closed" : input.data.door === "open" ? "open" : undefined
},
battery: input.data.battery,
}
Expand Down

0 comments on commit 4bdce9f

Please sign in to comment.