def index(self): # for debug purposes: #HueBridge.update() template = mako.template.Template(filename='plugins/HueControl/HueControl.tmpl') try: # Check the authentication with the bridge HueBridge.authenticate() HueBridge.update() except ConnectionException as e: return Template.render_template("", error="Bridge is not authenticated! Press the link button and <a href=\"\"> try again</a>!") rendered_template = template.render(lights=HueBridge.lights, groups=HueBridge.groups) return Template.render_template(rendered_template)
def index(self): # for debug purposes: #HueBridge.update() template = mako.template.Template( filename='plugins/HueControl/HueControl.tmpl') try: # Check the authentication with the bridge HueBridge.authenticate() HueBridge.update() except ConnectionException as e: return Template.render_template( "", error= "Bridge is not authenticated! Press the link button and <a href=\"\"> try again</a>!" ) rendered_template = template.render(lights=HueBridge.lights, groups=HueBridge.groups) return Template.render_template(rendered_template)