diff --git a/app/webserver.py b/app/webserver.py index 2ac70fa..f215ff8 100644 --- a/app/webserver.py +++ b/app/webserver.py @@ -39,7 +39,7 @@ class Webserver(object): ##-----------------------------------------------------------------------------------## app = Flask(__name__) - if(self.devices['yeelight'] != None): + if('yeelight' in self.devices): print("Enabled Yeelight") from app.devices import yeelight self.yeelight = yeelight.Yeelight(self.devices['yeelight']) @@ -60,7 +60,7 @@ class Webserver(object): else: print("Disabled Yeelight") - if(self.devices['ssh'] != None): + if('ssh' in self.devices): print("Enabled SSH") from app.devices import ssh self.ssh = ssh.SSH(self.devices['ssh']) @@ -81,7 +81,7 @@ class Webserver(object): else: print("Disabled SSH") - if(self.devices['wol'] != None): + if('wol' in self.devices): print("Enabled WOL") from app.devices import wol self.wol = wol.WOL(self.devices['wol'])