Created
September 23, 2019 15:41
-
-
Save voipnorm/14ac43a34abe3e406b86a8043ad6122a to your computer and use it in GitHub Desktop.
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
tp.on('status', (report) => { | |
console.log(report); | |
if(report.state === 'lights'){ | |
if(report.status === 'on'){ | |
lights(true); | |
}else{ | |
lights(false); | |
} | |
}else{ | |
//Dimmer still to be done | |
if(report.status === 'increment'){ | |
console.log("dimmer up"); | |
//to be done | |
}else{ | |
console.log("dimmer down"); | |
//to be done | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment