def command_tv(): command = request.args.get('command', '') if command == "on": remote_sky.standby() remote_tv.standby() remote_audio.optical() if command == "off": remote_sky.standby() remote_tv.standby() remote_audio.standby() if command == "switch": channel = request.args.get('channel', '') remote_sky.switch(channel) sys.stdout.flush() return redirect(url_for('index'))
def channelSwitch(channel): remote_sky.switch(channel) return channel