Skip to content

Commit

Permalink
Modified description about Mobile Presence Occupancy (SmartThingsComm…
Browse files Browse the repository at this point in the history
…unity#3697)

* Modified description about OccupancySensor

* Applied translate sense and modified indent
  • Loading branch information
SungyeonWoo authored and luisferreira1 committed Nov 27, 2018
1 parent 2ce434a commit 6c1ec6d
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,10 @@ private String parseName(String description) {
case "presence: 0":
case "presence: 1":
return "presence"
case "occupancy: 0":
case "occupancy: 1":
return "occupancy"
case "occupancy: 0":
case "occupancy: 1":
return "occupancy"
}
null
}

private String parseValue(String description) {
Expand All @@ -94,8 +93,8 @@ private parseDescriptionText(String linkText, String value, String description)
switch(value) {
case "not present": return "{{ linkText }} has left"
case "present": return "{{ linkText }} has arrived"
case "unoccupied": return "{{ linkText }} has unoccupied"
case "occupied": return "{{ linkText }} has occupied"
case "unoccupied": return "{{ linkText }} is away"
case "occupied": return "{{ linkText }} is inside"
default: return value
}
}
Expand All @@ -105,8 +104,8 @@ private getState(String value) {
switch(value) {
case "not present": return "left"
case "present": return "arrived"
case "unoccupied": return "unoccupied"
case "occupied": return "occupied"
case "unoccupied": return "away"
case "occupied": return "inside"
default: return value
}
}

0 comments on commit 6c1ec6d

Please sign in to comment.