mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-05 06:13:08 +01:00
DVCSMP-1615 Hue setColor throws exceptions when missing parameters
-DVCSMP-1637 Color picker set the light on but status not updated on the detail page -DVCSMP-1638 Temperature control selection set the light on but status not updated on the detail page -Added a lot of error checking for input parameters -Fixed some data parsing exceptions
This commit is contained in:
@@ -79,8 +79,12 @@ void off() {
|
||||
|
||||
void setLevel(percent) {
|
||||
log.debug "Executing 'setLevel'"
|
||||
parent.setLevel(this, percent)
|
||||
sendEvent(name: "level", value: percent)
|
||||
if (percent != null && percent >= 0 && percent <= 100) {
|
||||
parent.setLevel(this, percent)
|
||||
sendEvent(name: "level", value: percent)
|
||||
} else {
|
||||
log.warn "$percent is not 0-100"
|
||||
}
|
||||
}
|
||||
|
||||
void refresh() {
|
||||
|
||||
Reference in New Issue
Block a user