Created
March 31, 2021 00:56
-
-
Save nayelyzarazua-bluetrail/d356834baafade6f51863d298ae86b78 to your computer and use it in GitHub Desktop.
FortrezZ Water Meter_customCaps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Test DTH for custom capabilities >>>> waterFlowHighestRate | |
*/ | |
metadata { | |
definition (name: "testwaterFlowHighestRate2", vid:"4a5086e4-393f-39e1-9d28-1ca0df09729b", mnmn: "SmartThingsCommunity", author: "Nayely") { | |
capability "schoolwater29967.waterFlowHighestRate" | |
} | |
simulator {} | |
tiles {} | |
} | |
def installed() { | |
log.trace "Executing 'installed'" | |
initialize() | |
} | |
def updated() { | |
log.trace "Executing 'updated'" | |
initialize() | |
} | |
private initialize() { | |
log.trace "Executing 'initialize'" | |
sendEvent(name: "waterFlowHighRate", value: 10, unit:"gpm") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "schoolwater29967.waterFlowHighestRate", | |
"version": 1, | |
"status": "proposed", | |
"name": "Water Flow Highest Rate", | |
"attributes": { | |
"waterFlowHighRate": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"value": { | |
"type": "number" | |
}, | |
"unit": { | |
"type": "string", | |
"enum": [ | |
"gpm" | |
], | |
"default": "gpm" | |
} | |
}, | |
"additionalProperties": false, | |
"required": [ | |
"value" | |
] | |
}, | |
"enumCommands": [] | |
} | |
}, | |
"commands": {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dashboard": { | |
"states": [ | |
{ | |
"label": "{{waterFlowHighRate.value}} {{waterFlowHighRate.unit}}" | |
} | |
], | |
"actions": [], | |
"basicPlus": [] | |
}, | |
"detailView": [ | |
{ | |
"label": "Highest Water Flow Rate", | |
"displayType": "state", | |
"state": { | |
"label": "{{waterFlowHighRate.value}}", | |
"unit": "waterFlowHighRate.unit" | |
} | |
} | |
], | |
"id": "schoolwater29967.waterFlowHighestRate", | |
"version": 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment