mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-28 14:26:22 +01:00
DVCSMP-1727 Philips Hue: Update status on response
-Only send events when feedback is recevied from bridge -Cleaned up color conversions -DVCSMP-1728 Philips Hue: Handle new LAN polling -DVCSMP-1763 Philips Hue: Bad rounding can cause level to be 0, light on -DVCSMP-1678 Philips Hue: Bridge detail page should display the status. -DVCSMP-1669 Phillips Hue: The on/off button flickering between states -DEVC-450 Hue Connect app is throwing errors in the IDE -Changed manual refresh to check bridge and run poll() -Updated some strings
This commit is contained in:
@@ -68,20 +68,16 @@ def parse(description) {
|
||||
// handle commands
|
||||
void on() {
|
||||
log.trace parent.on(this)
|
||||
sendEvent(name: "switch", value: "on")
|
||||
}
|
||||
|
||||
void off() {
|
||||
log.trace parent.off(this)
|
||||
sendEvent(name: "switch", value: "off")
|
||||
}
|
||||
|
||||
void setLevel(percent) {
|
||||
log.debug "Executing 'setLevel'"
|
||||
if (percent != null && percent >= 0 && percent <= 100) {
|
||||
parent.setLevel(this, percent)
|
||||
sendEvent(name: "level", value: percent)
|
||||
sendEvent(name: "switch", value: "on")
|
||||
} else {
|
||||
log.warn "$percent is not 0-100"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user