diff --git a/client.py b/client.py index bd5fc73..c1969e7 100644 --- a/client.py +++ b/client.py @@ -12,11 +12,10 @@ def myCommandCallback(cmd): if cmd.event == "light": - command = cmd.payload["d"]["command"] - print command - if command == "on": + print cmd.command + if cmd.command == "on": GPIO.output(17, True) - elif command == "off": + elif cmd.command == "off": GPIO.output(17, False) try: