Skip to content

Commit

Permalink
#3 Added switch state logging to state on/off PUT method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Scheiding committed Feb 26, 2016
1 parent a6c5f34 commit 084aebb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions smartapps/jonscheiding/power-control.src/power-control.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def api_switch_get() {

def api_switch_state_put() {
def sw = find_switch(params.id)

log.info("Received request to turn switch ${sw.id} to ${params.state}. Switch is currently ${sw.currentSwitch}.")

switch(params.state) {
case "on":
Expand Down

0 comments on commit 084aebb

Please sign in to comment.