From 4c35b4754d401c1007c5bf78d4ccb3994dfa6571 Mon Sep 17 00:00:00 2001 From: slaupster Date: Tue, 11 Aug 2015 12:52:20 +0100 Subject: [PATCH] Use new Command class structure --- client.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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: