-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from konnected-io/beta
2.2.2
- Loading branch information
Showing
31 changed files
with
360 additions
and
98 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
62 changes: 62 additions & 0 deletions
62
...ted-io/konnected-temperature-probe-ds18b20.src/konnected-temperature-probe-ds18b20.groovy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** | ||
* Konnected Temperature Probe (DS18B20) | ||
* | ||
* Copyright 2018 Konnected Inc (https://konnected.io) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License | ||
* for the specific language governing permissions and limitations under the License. | ||
* | ||
*/ | ||
|
||
metadata { | ||
definition (name: "Konnected Temperature Probe (DS18B20)", namespace: "konnected-io", author: "konnected.io", mnmn: "SmartThings", vid: "generic-humidity") { | ||
capability "Temperature Measurement" | ||
} | ||
|
||
tiles { | ||
multiAttributeTile(name:"main", type:"thermostat", width:6, height:4) { | ||
tileAttribute("device.temperature", key: "PRIMARY_CONTROL") { | ||
attributeState "temperature", label:'${currentValue}°F', unit: "°F", backgroundColors: [ | ||
// Celsius Color Range | ||
[value: 0, color: "#153591"], | ||
[value: 7, color: "#1E9CBB"], | ||
[value: 15, color: "#90D2A7"], | ||
[value: 23, color: "#44B621"], | ||
[value: 29, color: "#F1D801"], | ||
[value: 33, color: "#D04E00"], | ||
[value: 36, color: "#BC2323"], | ||
// Fahrenheit Color Range | ||
[value: 40, color: "#153591"], | ||
[value: 44, color: "#1E9CBB"], | ||
[value: 59, color: "#90D2A7"], | ||
[value: 74, color: "#44B621"], | ||
[value: 84, color: "#F1D801"], | ||
[value: 92, color: "#D04E00"], | ||
[value: 96, color: "#BC2323"] | ||
] | ||
} | ||
} | ||
main "main" | ||
details "main" | ||
} | ||
} | ||
|
||
def updated() { | ||
parent.updateSettingsOnDevice() | ||
} | ||
|
||
// Update state sent from parent app | ||
def updateStates(states) { | ||
def temperature = new BigDecimal(states.temp) | ||
if (location.getTemperatureScale() == 'F') { | ||
temperature = temperature * 9 / 5 + 32 | ||
} | ||
sendEvent(name: "temperature", value: temperature.setScale(1, BigDecimal.ROUND_HALF_UP), unit: location.getTemperatureScale()) | ||
log.debug "Temperature: $temperature" | ||
} |
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
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
Binary file not shown.
Binary file renamed
BIN
+608 KB
firmware/konnected-firmware-2-2-1.bin → firmware/konnected-firmware-2-2-2.bin
Binary file not shown.
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
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
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
Oops, something went wrong.